The Free Software Media System - Server Backend & API
Fix conditions where the ! was swallowed in #726
Erwin de Haanf8aff0c51d04
diff --git a/MediaBrowser.Api/EnvironmentService.cs b/MediaBrowser.Api/EnvironmentService.csindex 907c44fe1d..bdd7a8f8f9 100644--- a/MediaBrowser.Api/EnvironmentService.cs+++ b/MediaBrowser.Api/EnvironmentService.cs@@ -144,7 +144,7 @@ namespace MediaBrowser.Api}else{- if (Directory.Exists(request.Path))+ if (!Directory.Exists(request.Path)){throw new FileNotFoundException("File not found", request.Path);}@@ -153,7 +153,7 @@ namespace MediaBrowser.Apielse{- if (!File.Exists(request.Path) && Directory.Exists(request.Path))+ if (!File.Exists(request.Path) && !Directory.Exists(request.Path)){throw new FileNotFoundException("Path not found", request.Path);}diff --git a/MediaBrowser.Api/Library/LibraryStructureService.cs b/MediaBrowser.Api/Library/LibraryStructureService.csindex c95a068051..d6bcf7878b 100644--- a/MediaBrowser.Api/Library/LibraryStructureService.cs+++ b/MediaBrowser.Api/Library/LibraryStructureService.cs@@ -255,7 +255,7 @@ namespace MediaBrowser.Api.Libraryvar currentPath = Path.Combine(rootFolderPath, request.Name);var newPath = Path.Combine(rootFolderPath, request.NewName);- if (Directory.Exists(currentPath))+ if (!Directory.Exists(currentPath)){throw new FileNotFoundException("The media collection does not exist");}