aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2019-01-13 15:49:05 -0500
committerGitHub <noreply@github.com>2019-01-13 15:49:05 -0500
commitf8dd182e422db49d98cc090f4e205cc46517f610 (patch)
treea263e80a7c9df09ee9b1a87577e3fedc475961b0
parentf50a997e4061f537e643f813bd873cb202707f0a (diff)
parentc8e3c1737aaceac39bc532ffb27066a18019e936 (diff)
Merge pull request #562 from hawken93/misc_fix
Fix error with uppercase photo extension and fix typo in a log line
-rw-r--r--Emby.Drawing/Common/ImageHeader.cs9
-rw-r--r--Emby.Server.Implementations/IO/FileRefresher.cs2
2 files changed, 6 insertions, 5 deletions
diff --git a/Emby.Drawing/Common/ImageHeader.cs b/Emby.Drawing/Common/ImageHeader.cs
index 592705d6c..3aa0cac25 100644
--- a/Emby.Drawing/Common/ImageHeader.cs
+++ b/Emby.Drawing/Common/ImageHeader.cs
@@ -50,12 +50,13 @@ namespace Emby.Drawing.Common
/// <exception cref="ArgumentException">The image was of an unrecognised format.</exception>
public static ImageSize GetDimensions(string path, ILogger logger, IFileSystem fileSystem)
{
- var extension = Path.GetExtension(path);
-
- if (string.IsNullOrEmpty(extension))
+ if (string.IsNullOrEmpty(path))
{
- throw new ArgumentException("ImageHeader doesn't support image file");
+ throw new ArgumentNullException(nameof(path));
}
+
+ string extension = Path.GetExtension(path).ToLower();
+
if (!SupportedExtensions.Contains(extension))
{
throw new ArgumentException("ImageHeader doesn't support " + extension);
diff --git a/Emby.Server.Implementations/IO/FileRefresher.cs b/Emby.Server.Implementations/IO/FileRefresher.cs
index 3256ea7e6..c2def33db 100644
--- a/Emby.Server.Implementations/IO/FileRefresher.cs
+++ b/Emby.Server.Implementations/IO/FileRefresher.cs
@@ -156,7 +156,7 @@ namespace Emby.Server.Implementations.IO
continue;
}
- Logger.LogInformation("{name} ({path}}) will be refreshed.", item.Name, item.Path);
+ Logger.LogInformation("{name} ({path}) will be refreshed.", item.Name, item.Path);
try
{