← Commit list

05b18065a

Chen Yu
Chen Yu
2018-09-09
SUCCESS Duration: 148s

Subject

remove_file: don't call rmdir if remove_file return failure

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/remove_file.c+1 -1
@@ -73,7 +73,7 @@ int FAST_FUNC remove_file(const char *path, int flags)
return status;
}
- if (rmdir(path) < 0) {
+ if (status == 0 && rmdir(path) < 0) {
bb_perror_msg("can't remove '%s'", path);
return -1;
}