Merge pull request #409 from liuming50/prevent-nftw-follow-symbolic-links

This commit is contained in:
Joachim Wiberg authored and GitHub committed 2024-08-24 14:56:28 +02:00
commit 2daa953bee
1 file changed
+1 -1
+1 -1
View File
@@ -90,7 +90,7 @@ static int rmrf(const char *path)
if (!fisdir(path)) if (!fisdir(path))
return 0; return 0;
nftw(path, do_delete, 20, FTW_DEPTH); nftw(path, do_delete, 20, FTW_DEPTH | FTW_PHYS);
if (remove(path) && errno != ENOENT) if (remove(path) && errno != ENOENT)
warn("Failed removing path %s", path); warn("Failed removing path %s", path);