소스 검색

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;
                 }