diff options
author | the little girl <yui@blekksprut.net> | 2014-02-21 17:33:12 +0100 |
---|---|---|
committer | the little girl <yui@blekksprut.net> | 2014-02-21 17:33:12 +0100 |
commit | bc199a9c3100b48d8109a010006655bf8ea1895b (patch) | |
tree | 2cf0d678a53feb0fd0712270941e11bcf150f0bb /wiki.c | |
parent | 827c442ab3586e6019b97714ca0b925a4625a361 (diff) | |
download | ukulele-bc199a9c3100b48d8109a010006655bf8ea1895b.tar.xz |
access -> eaccess
Diffstat (limited to 'wiki.c')
-rw-r--r-- | wiki.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,4 +1,5 @@ #define _POSIX_C_SOURCE 200809L +#define _GNU_SOURCE #include <stdlib.h> #include <stdio.h> @@ -20,14 +21,14 @@ int writable(char *path) { struct stat s; if(!stat(path, &s)) { if(S_ISREG(s.st_mode)) - return !access(path, W_OK); + return !eaccess(path, W_OK); else if(S_ISDIR(s.st_mode)) return 0; } char *dir = dirname(strdup(path)); if(!stat(dir, &s)) { if(S_ISDIR(s.st_mode)) - return !access(dir, W_OK); + return !eaccess(dir, W_OK); } return 0; } |