Skip to content

Commit 4a130ff

Browse files
committed
exclude "Search permission is denied on a component of the path prefix of filename" case from utime by using stat
1 parent f8ae40c commit 4a130ff

File tree

1 file changed

+8
-0
lines changed
  • dSploit/jni/dSploitd

1 file changed

+8
-0
lines changed

dSploit/jni/dSploitd/FS.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
#include "logger.h"
1919

2020
void debug_issue1(char *path) {
21+
struct stat st;
22+
23+
if(stat(path, &st)) {
24+
print( DEBUG, "stat(\"%s\"): %s", path, strerror(errno));
25+
} else if(!S_ISREG(st.st_mode)) {
26+
print( DEBUG, "\"%s\" is not a regular file", path);
27+
}
28+
2129
if(utime(path, NULL)) {
2230
print( DEBUG, "utime(\"%s\"): %s", path, strerror(errno));
2331
}

0 commit comments

Comments
 (0)