Looks like there is a tiny bug which causes the System.IO.DirectoryNotFoundException after context.Initialize() call when having same non-existing folder path set to AppDataPath and RootPath.
What I'm trying to do: download the game from standalone launcher to the specified folder.
What I expected to see: non-existing folder gets created when necessary & CleanWorkspace method shouldn't execute file removal at all if target folder doesn't exist.
Here is a stack trace:
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\focus\AppData\Roaming\Project\Game'.
at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
at System.IO.Enumeration.FileSystemEnumerator`1.Init()
at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, Boolean isNormalized, EnumerationOptions options)
at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options)
at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
at System.IO.Directory.GetFiles(String path, String searchPattern, EnumerationOptions enumerationOptions)
at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
at MHLab.Patch.Core.IO.FilesManager.GetFiles(String path, String pattern)
at MHLab.Patch.Core.IO.FilesManager.DeleteMultiple(String directory, String pattern)
at MHLab.Patch.Core.IO.FileSystem.DeleteMultipleFiles(FilePath path, String pattern)
at MHLab.Patch.Core.Client.UpdatingContext.CleanWorkspace()
at MHLab.Patch.Core.Client.UpdatingContext.Initialize()
Prevented this exception by checking the path in FilesManager.DeleteMultiple.
It should be enough to mitigate the issue! It will be included in the next version release!
Looks like there is a tiny bug which causes the
System.IO.DirectoryNotFoundException
aftercontext.Initialize()
call when having same non-existing folder path set toAppDataPath
andRootPath
.What I'm trying to do: download the game from standalone launcher to the specified folder. What I expected to see: non-existing folder gets created when necessary &
CleanWorkspace
method shouldn't execute file removal at all if target folder doesn't exist.Here is a stack trace: