Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
RevoLand committed Jan 27, 2017
1 parent 981d594 commit 0f265cd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
Binary file modified Binaries/Steam Library Manager.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion Source/Steam Library Manager/Definitions/Library.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void UpdateGameList()
{
List.JunkStuff.Add(new List.JunkInfo
{
FileSystemInfo = new DirectoryInfo(AcfFile.FullName),
FileSystemInfo = new FileInfo(AcfFile.FullName),
FolderSize = AcfFile.Length
});

Expand Down
18 changes: 12 additions & 6 deletions Source/Steam Library Manager/Forms/Main.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,14 @@ private void LibraryCleaner_ContextMenuItem_Click(object sender, RoutedEventArgs
}
else
{
if (currentJunk.FileSystemInfo.Exists)
if (currentJunk.FileSystemInfo is FileInfo)
{
if (currentJunk.FileSystemInfo is FileInfo)
if (((FileInfo)currentJunk.FileSystemInfo).Exists)
((FileInfo)currentJunk.FileSystemInfo).Delete();
else
}
else
{
if (((DirectoryInfo)currentJunk.FileSystemInfo).Exists)
((DirectoryInfo)currentJunk.FileSystemInfo).Delete(true);
}

Expand Down Expand Up @@ -403,11 +406,14 @@ private void LibraryCleaner_ButtonClick(object sender, RoutedEventArgs e)

foreach (Definitions.List.JunkInfo currentJunk in LibraryCleanerItems)
{
if (currentJunk.FileSystemInfo.Exists)
if (currentJunk.FileSystemInfo is FileInfo)
{
if (currentJunk.FileSystemInfo is FileInfo)
if (((FileInfo)currentJunk.FileSystemInfo).Exists)
((FileInfo)currentJunk.FileSystemInfo).Delete();
else
}
else
{
if (((DirectoryInfo)currentJunk.FileSystemInfo).Exists)
((DirectoryInfo)currentJunk.FileSystemInfo).Delete(true);
}

Expand Down
2 changes: 1 addition & 1 deletion Source/Steam Library Manager/Functions/Games.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static void AddNewGame(int appID, string appName, string installationPath
{
Definitions.List.JunkStuff.Add(new Definitions.List.JunkInfo
{
FileSystemInfo = new DirectoryInfo(Game.FullAcfPath.FullName),
FileSystemInfo = new FileInfo(Game.FullAcfPath.FullName),
FolderSize = Game.FullAcfPath.Length
});

Expand Down

0 comments on commit 0f265cd

Please sign in to comment.