diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2006-01-26 04:16:35 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2006-01-26 04:16:35 +0000 |
commit | dda4f7d1c1e419c08729b35a239ff85691c4503e (patch) | |
tree | e602761f489467ade01935f1d144323bb99f821e /lib | |
parent | f96155d58b601c1cc17a97566f9123af0fdeef24 (diff) | |
download | quilt-dda4f7d1c1e419c08729b35a239ff85691c4503e.tar.gz |
- Also check for access(path, R_OK|X_OK) before visiting all the
files in a directory: this avoids an error message for each file
in a non-executable directory.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/backup-files.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/backup-files.c b/lib/backup-files.c index f28e89c..caace72 100644 --- a/lib/backup-files.c +++ b/lib/backup-files.c @@ -384,7 +384,7 @@ foreachdir_rec(const char *path, struct stat *st, char *p = NULL; int failed = 0; - if (!(dir = opendir(path))) + if (access(path, R_OK|X_OK) || !(dir = opendir(path))) return walk(path, NULL); while ((dp = readdir(dir))) { char *p0 = p; |