diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-10-25 02:53:24 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-10-25 02:53:24 +0000 |
commit | 4750c46aea486895e409002a3139c672c540ec69 (patch) | |
tree | ec59a22fdb6168bd494c045568656f4ad179f97c /src/common | |
parent | beb73c90abd9d6a3266b02abaff61dce8b891d61 (diff) | |
download | tor-4750c46aea486895e409002a3139c672c540ec69.tar.gz tor-4750c46aea486895e409002a3139c672c540ec69.zip |
r16128@catbus: nickm | 2007-10-24 22:52:16 -0400
Fix windows mmap changes.
svn:r12171
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/compat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index cc8ef3aecd..1bc653f25a 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -250,11 +250,11 @@ tor_mmap_file(const char *filename) char *msg = format_win32_error(e); log_fn(severity, LD_FS, "Couldn't mmap file \"%s\": %s", filename, msg); tor_free(msg); + if (e == ERROR_FILE_NOT_FOUND || e == ERROR_PATH_NOT_FOUND) + errno = ENOENT; + else + errno = EINVAL; } - if (e == ERROR_FILE_NOT_FOUND || e == ERROR_PATH_NOT_FOUND) - e = ENOENT; - else - e = EINVAL; err: if (empty) errno = ERANGE; |