X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2Fapply-default-acl.c;h=19505282c2acda17960281e966a9d347a5bc1611;hb=5a1f29cb6c306e9d8b19c4b3d964c4a05c0bc27d;hp=0c43af7d975088c06019c8a44e69b66f14cdf63a;hpb=ef2420c59077d26e659e091e21731f282564a498;p=apply-default-acl.git diff --git a/src/apply-default-acl.c b/src/apply-default-acl.c index 0c43af7..1950528 100644 --- a/src/apply-default-acl.c +++ b/src/apply-default-acl.c @@ -51,13 +51,13 @@ mode_t get_mode(const char* path) { } struct stat s; - int result = stat(path, &s); + int result = lstat(path, &s); if (result == 0) { return s.st_mode; } else { - /* errno will be set already by stat() */ + /* errno will be set already by lstat() */ return result; } } @@ -78,7 +78,7 @@ bool is_regular_file(const char* path) { } struct stat s; - int result = stat(path, &s); + int result = lstat(path, &s); if (result == 0) { return S_ISREG(s.st_mode); } @@ -139,7 +139,7 @@ bool is_directory(const char* path) { } struct stat s; - int result = stat(path, &s); + int result = lstat(path, &s); if (result == 0) { return S_ISDIR(s.st_mode); } @@ -1014,7 +1014,7 @@ int main(int argc, char* argv[]) { * typos, too. */ if (!path_accessible(target)) { - fprintf(stderr, "%s: %s: no such file or directory\n", argv[0], target); + fprintf(stderr, "%s: %s: No such file or directory\n", argv[0], target); result = EXIT_FAILURE; continue; }