update file saving

This commit is contained in:
Luke Pulverenti
2016-11-09 12:24:57 -05:00
parent 24532f3e2d
commit 48a5fa17b0
6 changed files with 47 additions and 14 deletions

View File

@@ -1892,19 +1892,7 @@ namespace MediaBrowser.Controller.Entities
if (info.IsLocalFile)
{
// Delete the source file
var currentFile = FileSystem.GetFileInfo(info.Path);
// Deletion will fail if the file is hidden so remove the attribute first
if (currentFile.Exists)
{
if (currentFile.IsHidden)
{
FileSystem.SetHidden(currentFile.FullName, false);
}
FileSystem.DeleteFile(currentFile.FullName);
}
FileSystem.DeleteFile(info.Path);
}
return UpdateToRepository(ItemUpdateType.ImageUpdate, CancellationToken.None);