aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Library/LibraryStructureService.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2019-01-31 18:44:36 +0100
committerGitHub <noreply@github.com>2019-01-31 18:44:36 +0100
commit2a1f6361a5fea4d00888446b736829e341982f35 (patch)
treeb8962a7bd7f0926366fcbd57b8e353b2ab927a5f /MediaBrowser.Api/Library/LibraryStructureService.cs
parent055e43eda72dbf77a91ca22b5b007161c9d75c46 (diff)
parentffcf6bdd3aaad5068decf84b0400e433fdb8323c (diff)
Merge branch 'master' into locale
Diffstat (limited to 'MediaBrowser.Api/Library/LibraryStructureService.cs')
-rw-r--r--MediaBrowser.Api/Library/LibraryStructureService.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/MediaBrowser.Api/Library/LibraryStructureService.cs b/MediaBrowser.Api/Library/LibraryStructureService.cs
index 3be6b29dd..d6bcf7878 100644
--- a/MediaBrowser.Api/Library/LibraryStructureService.cs
+++ b/MediaBrowser.Api/Library/LibraryStructureService.cs
@@ -255,12 +255,12 @@ namespace MediaBrowser.Api.Library
var currentPath = Path.Combine(rootFolderPath, request.Name);
var newPath = Path.Combine(rootFolderPath, request.NewName);
- if (!_fileSystem.DirectoryExists(currentPath))
+ if (!Directory.Exists(currentPath))
{
throw new FileNotFoundException("The media collection does not exist");
}
- if (!string.Equals(currentPath, newPath, StringComparison.OrdinalIgnoreCase) && _fileSystem.DirectoryExists(newPath))
+ if (!string.Equals(currentPath, newPath, StringComparison.OrdinalIgnoreCase) && Directory.Exists(newPath))
{
throw new ArgumentException("Media library already exists at " + newPath + ".");
}
@@ -273,11 +273,11 @@ namespace MediaBrowser.Api.Library
if (string.Equals(currentPath, newPath, StringComparison.OrdinalIgnoreCase))
{
var tempPath = Path.Combine(rootFolderPath, Guid.NewGuid().ToString("N"));
- _fileSystem.MoveDirectory(currentPath, tempPath);
+ Directory.Move(currentPath, tempPath);
currentPath = tempPath;
}
- _fileSystem.MoveDirectory(currentPath, newPath);
+ Directory.Move(currentPath, newPath);
}
finally
{