[ian-reeds-games] Re: Error downloading when having manually downloaded a map pack before

  • From: Ian Reed <support@xxxxxxxxxxxxxxxxxxx>
  • To: ian-reeds-games@xxxxxxxxxxxxx
  • Date: Sun, 08 Dec 2013 09:05:34 -0700

Thanks Craig.

Yeah, deleting the Age of Warlords folder inside the map packs folder should fix it. I'm not sure why it happens as I'm just calling Directory.Delete on that folder and passing true for the recursive parameter. Intellisense says that exception can get thrown if recursive is false and the directory is not empty. Pretty confusing. Perhaps it actually has to do with a file being read only or you having an explorer window open for that path. I could probably update the code to remove all read only attributes on each file before trying to delete.
Well, thanks for letting me know anyway.

Ian Reed

On 12/8/2013 5:47 AM, Craig Brett wrote:
Hi Ian,

I'm having trouble updating Allan's Age of Warlords map pack.

I believe I manually downloaded the map pack before. And now when I try to update it in-game, it gets angry at me and throws an exception. The exception I get is this:

System.IO.IOException: The directory is not empty.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound) at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
   at System.IO.Directory.Delete(String path, Boolean recursive)
at Game.Downloading.HandleCompletedDownload() in C:\Data\Recent\TacticalRPG\TacticalRPG\States\Downloading.cs:line 93 at Game.Downloading.Process(Empty ent) in C:\Data\Recent\TacticalRPG\TacticalRPG\States\Downloading.cs:line 60 at Game.StateMachine`1.Process() in C:\Data\Recent\TacticalRPG\TacticalRPG\StateMachine.cs:line 38 at Game.Form1.RunGameLoop(Boolean keyPressed) in C:\Data\Recent\TacticalRPG\TacticalRPG\Form1.cs:line 381 at Game.Form1.GameLoopTimer_Tick(Object sender, EventArgs e) in C:\Data\Recent\TacticalRPG\TacticalRPG\Form1.cs:line 324
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I may have misdiagnosed the bug, it may be something else causing it, but those are the steps I took and the result I got. I'm going to try deleting that map pack and downloading again.

I thought you'd want to know though.

Cheers,

Craig



Other related posts: