Unwrapped MoveDirectory, DirectoryExists, FileExists & removed MoveFile

This commit is contained in:
Erwin de Haan
2019-01-26 22:59:53 +01:00
parent a430568082
commit 581a7fe078
38 changed files with 89 additions and 87 deletions

View File

@@ -137,14 +137,14 @@ namespace MediaBrowser.Api
{
if (request.IsFile.Value)
{
if (!_fileSystem.FileExists(request.Path))
if (!File.Exists(request.Path))
{
throw new FileNotFoundException("File not found", request.Path);
}
}
else
{
if (!_fileSystem.DirectoryExists(request.Path))
if (Directory.Exists(request.Path))
{
throw new FileNotFoundException("File not found", request.Path);
}
@@ -153,7 +153,7 @@ namespace MediaBrowser.Api
else
{
if (!_fileSystem.FileExists(request.Path) && !_fileSystem.DirectoryExists(request.Path))
if (!File.Exists(request.Path) && Directory.Exists(request.Path))
{
throw new FileNotFoundException("Path not found", request.Path);
}