diff options
Diffstat (limited to 'MediaBrowser.Providers/Manager/ItemImageProvider.cs')
| -rw-r--r-- | MediaBrowser.Providers/Manager/ItemImageProvider.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/MediaBrowser.Providers/Manager/ItemImageProvider.cs b/MediaBrowser.Providers/Manager/ItemImageProvider.cs index 8de56109a..e9a675b0a 100644 --- a/MediaBrowser.Providers/Manager/ItemImageProvider.cs +++ b/MediaBrowser.Providers/Manager/ItemImageProvider.cs @@ -372,14 +372,14 @@ namespace MediaBrowser.Providers.Manager } // Delete the source file - var currentFile = new FileInfo(image.Path); + var currentFile = _fileSystem.GetFileInfo(image.Path); // Deletion will fail if the file is hidden so remove the attribute first if (currentFile.Exists) { - if ((currentFile.Attributes & FileAttributes.Hidden) == FileAttributes.Hidden) + if (currentFile.IsHidden) { - currentFile.Attributes &= ~FileAttributes.Hidden; + _fileSystem.SetHidden(currentFile.FullName, false); } _fileSystem.DeleteFile(currentFile.FullName); @@ -613,7 +613,7 @@ namespace MediaBrowser.Providers.Manager { try { - if (item.GetImages(imageType).Any(i => new FileInfo(i.Path).Length == response.ContentLength.Value)) + if (item.GetImages(imageType).Any(i => _fileSystem.GetFileInfo(i.Path).Length == response.ContentLength.Value)) { response.Content.Dispose(); continue; |
