update: don't skip hidden files
Skip only the special directory entries "." and "..", don't skip all other "hidden" files.
This commit is contained in:
parent
92513c3309
commit
fa56ff3d52
@ -307,10 +307,12 @@ updateInDirectory(struct directory *directory,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we don't look at hidden files nor files with newlines in them */
|
/* we don't look at "." / ".." nor files with newlines in their name */
|
||||||
static int skip_path(const char *path)
|
static bool skip_path(const char *path)
|
||||||
{
|
{
|
||||||
return (path[0] == '.' || strchr(path, '\n')) ? 1 : 0;
|
return (path[0] == '.' && path[1] == 0) ||
|
||||||
|
(path[0] == '.' && path[1] == '.' && path[2] == 0) ||
|
||||||
|
strchr(path, '\n') != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
Loading…
Reference in New Issue
Block a user