diff options
author | Natanael Copa <natanael.copa@gmail.com> | 2012-05-22 17:11:46 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-05-28 01:29:15 +0200 |
commit | 02112d8ae3d0c07214fb2b132e0eacb4ff39d167 (patch) | |
tree | 8cc41e1af5cdea68c393190b27f902f3a0a195fd /libbb/make_directory.c | |
parent | dfc2473b9ed88039697ac89ee2a4301cdaefcf84 (diff) | |
download | busybox-w32-02112d8ae3d0c07214fb2b132e0eacb4ff39d167.tar.gz busybox-w32-02112d8ae3d0c07214fb2b132e0eacb4ff39d167.tar.bz2 busybox-w32-02112d8ae3d0c07214fb2b132e0eacb4ff39d167.zip |
unzip: ignore chmod errors
This makes unzip to FAT filesystems not exit with error.
This is similar to how the "normal" unzip works.
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/make_directory.c')
-rw-r--r-- | libbb/make_directory.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libbb/make_directory.c b/libbb/make_directory.c index 72303e7a3..7826b90f5 100644 --- a/libbb/make_directory.c +++ b/libbb/make_directory.c | |||
@@ -107,6 +107,10 @@ int FAST_FUNC bb_make_directory(char *path, long mode, int flags) | |||
107 | * an error. */ | 107 | * an error. */ |
108 | if ((mode != -1) && (chmod(path, mode) < 0)) { | 108 | if ((mode != -1) && (chmod(path, mode) < 0)) { |
109 | fail_msg = "set permissions of"; | 109 | fail_msg = "set permissions of"; |
110 | if (flags & FILEUTILS_IGNORE_CHMOD_ERR) { | ||
111 | flags = 0; | ||
112 | goto print_err; | ||
113 | } | ||
110 | break; | 114 | break; |
111 | } | 115 | } |
112 | goto ret0; | 116 | goto ret0; |
@@ -116,8 +120,9 @@ int FAST_FUNC bb_make_directory(char *path, long mode, int flags) | |||
116 | *s = c; | 120 | *s = c; |
117 | } /* while (1) */ | 121 | } /* while (1) */ |
118 | 122 | ||
119 | bb_perror_msg("can't %s directory '%s'", fail_msg, path); | ||
120 | flags = -1; | 123 | flags = -1; |
124 | print_err: | ||
125 | bb_perror_msg("can't %s directory '%s'", fail_msg, path); | ||
121 | goto ret; | 126 | goto ret; |
122 | ret0: | 127 | ret0: |
123 | flags = 0; | 128 | flags = 0; |