Directory deletion no longer recurses into symlinks

This commit is contained in:
Cyberboss
2017-09-24 15:14:35 -04:00
parent 8951c8746f
commit 88dde25e6d
2 changed files with 5 additions and 14 deletions
+5 -1
View File
@@ -30,7 +30,11 @@ namespace TGServerService
if (excludeRoot != null)
for (var I = 0; I < excludeRoot.Count; ++I)
excludeRoot[I] = excludeRoot[I].ToLower();
if (!di.Attributes.HasFlag(FileAttributes.Directory))
{ //this is probably a symlink
Directory.Delete(di.FullName);
return;
}
NormalizeAndDelete(di, excludeRoot);
if (!ContentsOnly)
{