17 |
|
|
18 |
if (lstat(path, &path_stat) < 0) { |
if (lstat(path, &path_stat) < 0) { |
19 |
if (errno != ENOENT) { |
if (errno != ENOENT) { |
20 |
bb_perror_msg("cannot stat '%s'", path); |
bb_perror_msg("can't stat '%s'", path); |
21 |
return -1; |
return -1; |
22 |
} |
} |
23 |
if (!(flags & FILEUTILS_FORCE)) { |
if (!(flags & FILEUTILS_FORCE)) { |
24 |
bb_perror_msg("cannot remove '%s'", path); |
bb_perror_msg("can't remove '%s'", path); |
25 |
return -1; |
return -1; |
26 |
} |
} |
27 |
return 0; |
return 0; |
63 |
} |
} |
64 |
|
|
65 |
if (closedir(dp) < 0) { |
if (closedir(dp) < 0) { |
66 |
bb_perror_msg("cannot close '%s'", path); |
bb_perror_msg("can't close '%s'", path); |
67 |
return -1; |
return -1; |
68 |
} |
} |
69 |
|
|
74 |
} |
} |
75 |
|
|
76 |
if (rmdir(path) < 0) { |
if (rmdir(path) < 0) { |
77 |
bb_perror_msg("cannot remove '%s'", path); |
bb_perror_msg("can't remove '%s'", path); |
78 |
return -1; |
return -1; |
79 |
} |
} |
80 |
|
|
94 |
} |
} |
95 |
|
|
96 |
if (unlink(path) < 0) { |
if (unlink(path) < 0) { |
97 |
bb_perror_msg("cannot remove '%s'", path); |
bb_perror_msg("can't remove '%s'", path); |
98 |
return -1; |
return -1; |
99 |
} |
} |
100 |
|
|