mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Fix conditions where the ! was swallowed in #726
This commit is contained in:
parent
c8cb908004
commit
f8aff0c51d
@ -144,7 +144,7 @@ namespace MediaBrowser.Api
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Directory.Exists(request.Path))
|
if (!Directory.Exists(request.Path))
|
||||||
{
|
{
|
||||||
throw new FileNotFoundException("File not found", request.Path);
|
throw new FileNotFoundException("File not found", request.Path);
|
||||||
}
|
}
|
||||||
@ -153,7 +153,7 @@ namespace MediaBrowser.Api
|
|||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
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);
|
throw new FileNotFoundException("Path not found", request.Path);
|
||||||
}
|
}
|
||||||
|
@ -255,7 +255,7 @@ namespace MediaBrowser.Api.Library
|
|||||||
var currentPath = Path.Combine(rootFolderPath, request.Name);
|
var currentPath = Path.Combine(rootFolderPath, request.Name);
|
||||||
var newPath = Path.Combine(rootFolderPath, request.NewName);
|
var newPath = Path.Combine(rootFolderPath, request.NewName);
|
||||||
|
|
||||||
if (Directory.Exists(currentPath))
|
if (!Directory.Exists(currentPath))
|
||||||
{
|
{
|
||||||
throw new FileNotFoundException("The media collection does not exist");
|
throw new FileNotFoundException("The media collection does not exist");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user