summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2006-01-26 04:16:35 +0000
committerAndreas Gruenbacher <agruen@suse.de>2006-01-26 04:16:35 +0000
commitdda4f7d1c1e419c08729b35a239ff85691c4503e (patch)
treee602761f489467ade01935f1d144323bb99f821e
parentf96155d58b601c1cc17a97566f9123af0fdeef24 (diff)
downloadquilt-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.
-rw-r--r--lib/backup-files.c2
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;