One extra tweak to the just-committed code.

This commit is contained in:
Wayne Davison
2005-10-15 19:15:29 +00:00
parent d649b78920
commit 35812ea1f9

2
util.c
View File

@@ -791,7 +791,7 @@ char *sanitize_path(char *dest, const char *p, const char *rootdir, int depth)
* always be left pointing after a slash
*/
if (*p == '.' && (p[1] == '/' || p[1] == '\0')) {
if (leave_one_dotdir && p[1] && sanp != dest)
if (leave_one_dotdir && p[1])
leave_one_dotdir = 0;
else {
/* skip "." component */