Skip to content

Commit

Permalink
Fixed crashes when trying to move or skip images, that don't exist. (#13
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Lolle2000la authored Feb 19, 2018
1 parent efb30e3 commit f0174a9
Show file tree
Hide file tree
Showing 10 changed files with 247 additions and 179 deletions.
12 changes: 6 additions & 6 deletions Image Sort Installer/Image Sort Installer.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:Image sort.Update, Version=1.7.1.0, Culture=neutral, processorArchitecture=MSIL"
"AssemblyAsmDisplayName" = "8:Image sort.Update, Version=1.7.2.0, Culture=neutral, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_2444875B8A476DC2CCC6570801FD1260"
Expand Down Expand Up @@ -325,7 +325,7 @@
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:Image sort.Logic, Version=1.7.1.0, Culture=neutral, processorArchitecture=MSIL"
"AssemblyAsmDisplayName" = "8:Image sort.Logic, Version=1.7.2.0, Culture=neutral, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_A87679A42B444F8385B7C65A7F9ACF32"
Expand Down Expand Up @@ -356,7 +356,7 @@
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:Image sort.UI.Dialogs, Version=1.7.1.0, Culture=neutral, processorArchitecture=MSIL"
"AssemblyAsmDisplayName" = "8:Image sort.UI.Dialogs, Version=1.7.2.0, Culture=neutral, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_A87C41C6DEB6942B8A32BC581162B42C"
Expand Down Expand Up @@ -479,15 +479,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Image Sort"
"ProductCode" = "8:{C2320D1A-5531-4750-B73D-EFBC41F373CC}"
"PackageCode" = "8:{206BD599-AE40-440A-8C7A-299A528152F1}"
"ProductCode" = "8:{A732DAB4-9E13-4DDF-928D-2A8A78985A86}"
"PackageCode" = "8:{5D3D18BB-3DB0-4FF6-AD06-67C2F8EBBCB0}"
"UpgradeCode" = "8:{1AC9D063-74DA-4D56-BA4A-C7F4216CFAF3}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:1.7.2"
"ProductVersion" = "8:1.7.3"
"Manufacturer" = "8:Lolle2000la"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
Expand Down
2 changes: 2 additions & 0 deletions Image sort.Logic/FolderSelector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ public void MoveFileTo(string source,string destination)

try
{
// Only run, if there is an existing file, that has been given back.
if (File.Exists(source))
// Making sure the file doesn't already exist at destination
if (!File.Exists(destination))
{
Expand Down
7 changes: 6 additions & 1 deletion Image sort.Logic/ImageSelectorQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,12 @@ public string GetImagePath()
imagePathPool.Dequeue();
}

return imagePathPool.Dequeue();
if (imagePathPool.Count > 0)
// SUCCESS
return imagePathPool.Dequeue();
else
// FAILURE
return "";
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions Image sort.Logic/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.7.2.0")]
[assembly: AssemblyFileVersion("1.7.2.0")]
[assembly: AssemblyVersion("1.7.3.0")]
[assembly: AssemblyFileVersion("1.7.3.0")]
[assembly: NeutralResourcesLanguage("en-US")]

4 changes: 2 additions & 2 deletions Image sort.UI.Dialogs/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.7.2.0")]
[assembly: AssemblyFileVersion("1.7.2.0")]
[assembly: AssemblyVersion("1.7.3.0")]
[assembly: AssemblyFileVersion("1.7.3.0")]
Loading

0 comments on commit f0174a9

Please sign in to comment.