mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-31 12:14:21 -04:00
Apply suggestions from code review for flipped conditions.
Co-Authored-By: EraYaN <EraYaN@users.noreply.github.com>
This commit is contained in:
parent
838541b825
commit
91e99effc9
@ -46,7 +46,7 @@ namespace MediaBrowser.MediaEncoding.Configuration
|
|||||||
&& !string.Equals(oldEncodingConfig.TranscodingTempPath ?? string.Empty, newPath))
|
&& !string.Equals(oldEncodingConfig.TranscodingTempPath ?? string.Empty, newPath))
|
||||||
{
|
{
|
||||||
// Validate
|
// Validate
|
||||||
if (Directory.Exists(newPath))
|
if (!Directory.Exists(newPath))
|
||||||
{
|
{
|
||||||
throw new FileNotFoundException(string.Format("{0} does not exist.", newPath));
|
throw new FileNotFoundException(string.Format("{0} does not exist.", newPath));
|
||||||
}
|
}
|
||||||
|
@ -214,7 +214,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
throw new ArgumentNullException(nameof(path));
|
throw new ArgumentNullException(nameof(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!File.Exists(path) && Directory.Exists(path))
|
if (!File.Exists(path) && !Directory.Exists(path))
|
||||||
{
|
{
|
||||||
throw new ResourceNotFoundException();
|
throw new ResourceNotFoundException();
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ namespace MediaBrowser.Providers.TV
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check this in order to avoid logging an exception due to directory not existing
|
// Check this in order to avoid logging an exception due to directory not existing
|
||||||
if (Directory.Exists(seriesDataPath))
|
if (!Directory.Exists(seriesDataPath))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user