Skip to content

Commit

Permalink
Fixed bug #2
Browse files Browse the repository at this point in the history
  • Loading branch information
daredloco committed Oct 26, 2020
1 parent b97849e commit 7cfb5ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GitInstaller/GitInstaller/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.3.0")]
[assembly: AssemblyFileVersion("1.5.3.0")]
[assembly: AssemblyVersion("1.5.4.0")]
[assembly: AssemblyFileVersion("1.5.4.0")]
5 changes: 5 additions & 0 deletions GitInstaller/GitInstaller/Uninstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ public static bool DoUninstall(string flocation)
{
if (!File.Exists(fline))
throw new Exception("File \"" + fline + "\" does not exist");
FileInfo fi = new FileInfo(fline);
string folderpath = fi.Directory.FullName;
File.Delete(fline);
bool folderhasfiles = Directory.EnumerateFiles(folderpath).Any();
if (!folderhasfiles)
Directory.Delete(folderpath);
MainWindow.Instance.WriteLog("File \"" + fline + "\" deleted!");
}
catch (Exception ex)
Expand Down

0 comments on commit 7cfb5ed

Please sign in to comment.