Fixed a bug in the last change: Failures returned a wrong errno.
Fixed a bug in the last change: Failures returned a wrong errno.

JFLarvoire/SysToolsLib,JFLarvoire/SysToolsLib,JFLarvoire/SysToolsLib,JFLarvoire/SysToolsLib