Mercurial > repos > snowblizz-super-API-ideas
changeset 281:c035afa4a42c
Fixes #301: "Reload files" doesn't work when folder didn't exist
* DirectoryInfo objects cache their state, so force a refresh before checking if they exist
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 31 Jul 2010 15:26:53 +0000 |
parents | 937cb8d92aa8 |
children | cd082d7bd4d9 8981fc45fe17 |
files | api/AbstractWarFoundryLoader.cs |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/api/AbstractWarFoundryLoader.cs Wed Jul 21 20:27:40 2010 +0000 +++ b/api/AbstractWarFoundryLoader.cs Sat Jul 31 15:26:53 2010 +0000 @@ -151,7 +151,9 @@ List<FileLoadFailure> fails = new List<FileLoadFailure>(); foreach (DirectoryInfo directory in directories) - { + { + directory.Refresh(); + if (directory.Exists) { List<FileLoadFailure> directoryFails = FillLoadableFilesForDirectory(loadableRaces, loadableGameSystems, directory);