mkdir: CHASE_NONEXISTENT cannot used in chase_symlinks_and_stat()

This commit is contained in:
Yu Watanabe
2022-02-02 15:09:45 +09:00
parent e4de58c823
commit e22916e61d
+1 -1
View File
@@ -42,7 +42,7 @@ int mkdir_safe_internal(
if ((flags & MKDIR_FOLLOW_SYMLINK) && S_ISLNK(st.st_mode)) {
_cleanup_free_ char *p = NULL;
r = chase_symlinks_and_stat(path, NULL, CHASE_NONEXISTENT, &p, &st, NULL);
r = chase_symlinks_and_stat(path, NULL, 0, &p, &st, NULL);
if (r < 0)
return r;
if (r == 0)