Browse code

fix checkaccess() return value on win32 (bb#847)

git-svn: trunk@3657

Tomasz Kojm authored on 2008/02/19 23:50:42
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Tue Feb 19 14:50:29 CET 2008 (tk)
2
+---------------------------------
3
+  * clamscan/others.c: fix checkaccess() return value on win32 (bb#847)
4
+
1 5
 Tue Feb 19 14:32:45 CET 2008 (tk)
2 6
 ---------------------------------
3 7
   * shared/misc.c: freshdbdir(): check freshclam.conf instead of clamd.conf;
... ...
@@ -77,7 +77,7 @@ int fileinfo(const char *filename, short i)
77 77
 /* FIXME: Handle users correctly */
78 78
 int checkaccess(const char *path, const char *username, int mode)
79 79
 {
80
-    return _access(path, mode);
80
+    return !_access(path, mode);
81 81
 }
82 82
 #else
83 83
 int checkaccess(const char *path, const char *username, int mode)