Skip to content

Commit 20e61b5

Browse files
lpprojPerditionC
authored andcommitted
fix recursive remove dir
1 parent 74eddec commit 20e61b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/rmdir.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ int rmdir_withfiles(char * path, int maxlen)
9292
}
9393

9494
/* finally actually remove the directory */
95-
*p = '\0';
95+
p[-1] = '\0';
9696
return rmdir(path);
9797
}
9898

0 commit comments

Comments
 (0)