瀏覽代碼

update bug for jpg and JPG

Shenjian 7 年之前
父節點
當前提交
df22c5b1bd
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      PhotoSorter/Program.cs

+ 2 - 2
PhotoSorter/Program.cs

@@ -40,7 +40,7 @@ namespace PhotoSorter
                     {
                         continue;
                     }
-                    if (Path.GetExtension(file) != ".jpg")
+                    if (Path.GetExtension(file).ToLower() != ".jpg")
                     {
                         continue;
                     }
@@ -98,7 +98,7 @@ namespace PhotoSorter
                     string dateTaken = r.Replace(Encoding.UTF8.GetString(propItem.Value), "-", 2);
                     return DateTime.Parse(dateTaken);
                 }
-                catch (ArgumentException ex)
+                catch (Exception ex)
                 {
                     return DateTime.MinValue;
                 }