path-util: invert PATH_STARTSWITH_ACCEPT_DOT_DOT flag

As requested: https://github.com/systemd/systemd/pull/37572#pullrequestreview-2861928094
This commit is contained in:
Lennart Poettering
2025-05-23 06:51:45 +02:00
parent 482107724f
commit ceed11e465
6 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ int rmdir_parents(const char *path, const char *stop) {
assert(*slash == '/');
*slash = '\0';
if (path_startswith_full(stop, p, /* flags= */ 0))
if (path_startswith_full(stop, p, PATH_STARTSWITH_REFUSE_DOT_DOT))
return 0;
if (rmdir(p) < 0 && errno != ENOENT)