Merge pull request #302 from Moonlight-Panel/FixHostRename

Fixed host file system rename
This commit is contained in:
Marcel Baumgartner 2023-09-06 15:43:53 +02:00 committed by GitHub
commit caf990dd4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,15 +110,15 @@ public class HostFileAccess : FileAccess
if (fileData.IsFile)
File.Delete(currhp + fileData.Name);
else
Directory.Delete(currhp + fileData.Name);
Directory.Delete(currhp + fileData.Name, true);
}
public override async Task Move(FileData fileData, string newPath)
{
if (fileData.IsFile)
File.Move(currhp + fileData.Name, newPath);
File.Move(currhp + fileData.Name, BasePath + newPath);
else
Directory.Move(currhp + fileData.Name, newPath);
Directory.Move(currhp + fileData.Name, BasePath + newPath);
}
public override Task Compress(params FileData[] files)