Fix tr_moveFile error reporting

Remove unused `renamed` argument.
Use tr_error instead of errno to report errors to support Win32 file
wrappers which do not map Windows error codes to POSIX ones.
Return bool instead of int (0/-1).

Uncomment tr_error_prefix and tr_error_propagate_prefixed functions.
This commit is contained in:
Mike Gelfand
2014-12-10 18:37:58 +00:00
parent a3fdd5f029
commit 4fe156a255
6 changed files with 63 additions and 47 deletions

View File

@@ -16,12 +16,16 @@
#define TR_ERROR_IS_ENOSPC(code) ((code) == ERROR_DISK_FULL)
#define TR_ERROR_EINVAL ERROR_INVALID_PARAMETER
#else /* _WIN32 */
#include <errno.h>
#define TR_ERROR_IS_ENOSPC(code) ((code) == ENOSPC)
#define TR_ERROR_EINVAL EINVAL
#endif /* _WIN32 */
#endif /* TR_ERROR_TYPES_H */