projects
/
dus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
b7c3359
)
Fixed the permission denied with the -i option on lstat().
author
Francois Fleuret
<francois@fleuret.org>
Wed, 18 Aug 2010 16:22:53 +0000
(18:22 +0200)
committer
Francois Fleuret
<francois@fleuret.org>
Wed, 18 Aug 2010 16:22:53 +0000
(18:22 +0200)
dus.c
patch
|
blob
|
history
diff --git
a/dus.c
b/dus.c
index
7cdf03e
..
9d1850c
100644
(file)
--- a/
dus.c
+++ b/
dus.c
@@
-104,10
+104,14
@@
size_sum_t entry_size(const char *name) {
result = 0;
if(lstat(name, &dummy) != 0) {
- fprintf(stderr,
- "dus: Can not stat %s: %s\n",
- name, strerror(errno));
- exit(EXIT_FAILURE);
+ if(!(errno == EACCES && ignore_protected_files)) {
+ fprintf(stderr,
+ "dus: Can not stat %s: %s\n",
+ name, strerror(errno));
+ exit(EXIT_FAILURE);
+ } else {
+ return 0;
+ }
}
if(S_ISLNK(dummy.st_mode)) {