aboutsummaryrefslogtreecommitdiff
path: root/Emby.Common.Implementations/IO/ManagedFileSystem.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-12-28 16:13:12 -0500
committerGitHub <noreply@github.com>2016-12-28 16:13:12 -0500
commit2cb0f3eed635bb468b3672d08dca9a720b4fb48f (patch)
tree1a0d7c53ec148619ae966a81187413a33ca9a8a4 /Emby.Common.Implementations/IO/ManagedFileSystem.cs
parente47ccdce4247b93faa6d27849b255aac83324c42 (diff)
parentc10b152018967ddafe72efbccfe8ca6c586cbf04 (diff)
Merge pull request #2372 from MediaBrowser/beta
Beta
Diffstat (limited to 'Emby.Common.Implementations/IO/ManagedFileSystem.cs')
-rw-r--r--Emby.Common.Implementations/IO/ManagedFileSystem.cs29
1 files changed, 2 insertions, 27 deletions
diff --git a/Emby.Common.Implementations/IO/ManagedFileSystem.cs b/Emby.Common.Implementations/IO/ManagedFileSystem.cs
index 62d285072..78070a5d9 100644
--- a/Emby.Common.Implementations/IO/ManagedFileSystem.cs
+++ b/Emby.Common.Implementations/IO/ManagedFileSystem.cs
@@ -490,38 +490,13 @@ namespace Emby.Common.Implementations.IO
var temp1 = Path.GetTempFileName();
// Copying over will fail against hidden files
- RemoveHiddenAttribute(file1);
- RemoveHiddenAttribute(file2);
+ SetHidden(file1, false);
+ SetHidden(file2, false);
CopyFile(file1, temp1, true);
CopyFile(file2, file1, true);
CopyFile(temp1, file2, true);
-
- DeleteFile(temp1);
- }
-
- /// <summary>
- /// Removes the hidden attribute.
- /// </summary>
- /// <param name="path">The path.</param>
- private void RemoveHiddenAttribute(string path)
- {
- if (string.IsNullOrEmpty(path))
- {
- throw new ArgumentNullException("path");
- }
-
- var currentFile = new FileInfo(path);
-
- // This will fail if the file is hidden
- if (currentFile.Exists)
- {
- if ((currentFile.Attributes & FileAttributes.Hidden) == FileAttributes.Hidden)
- {
- currentFile.Attributes &= ~FileAttributes.Hidden;
- }
- }
}
public bool ContainsSubPath(string parentPath, string path)