EpicKitten / PUBG-Replay-Manager

Shows undocumented information from PUBG replays, and has the ability to import and export replays
GNU General Public License v3.0
50 stars 14 forks source link

Crash on deleting replay #14

Closed swreeser closed 6 years ago

swreeser commented 6 years ago

Did this three times in a row. When I delete a replay the manager crashes.

Tried to delete a replay: match.bro.official.2018-02.na.squad.2018.02.21.4e8e7417-f152-4a26-b38f-e4e0f0d36af9__USER__8c1b0bc4d5b75f60b85192638f2863f0

Got an error:

System.IO.DirectoryNotFoundException
  HResult=0x80070003
  Message=Could not find a part of the path 'C:\Users\user\AppData\Local\TslGame\Saved\Demos\match.bro.official.2018-02.na.squad.2018.02.21.4e8e7417-f152-4a26-b38f-e4e0f0d36af9__USER__8c1b0bc4d5b75f60b85192638f2863f0'.
  Source=mscorlib
  StackTrace:
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileSystemEnumerableIterator`1.CommonInit()
   at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
   at System.IO.Directory.GetDirectories(String path)
   at PUBG_Replay_Manager.Main.GetDirectorySize(String directory) in D:\dev\pubgrm\PUBG_Replay_Manager\Main.cs:line 775
   at PUBG_Replay_Manager.Main.ReadReplayInfo(String directory_of_recording) in D:\dev\pubgrm\PUBG_Replay_Manager\Main.cs:line 655
   at PUBG_Replay_Manager.Main.RefreshReplayList() in D:\dev\pubgrm\PUBG_Replay_Manager\Main.cs:line 54
   at PUBG_Replay_Manager.Main.deletereplay_Click(Object sender, EventArgs e) in D:\dev\pubgrm\PUBG_Replay_Manager\Main.cs:line 851
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at PUBG_Replay_Manager.Program.Main() in D:\dev\pubgrm\PUBG_Replay_Manager\Program.cs:line 17
swreeser commented 6 years ago

Checking if the directory exists and returning 0 for size works.

EpicKitten commented 6 years ago

Patched by swreeser