-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Simply put if I do following:
var sourceFilePath = "path_to_previously_downloaded_file"; //file does exist!
var destinationPath = "path_to_directory_somethere_in_Application.persistentDataPath"; //directory may exist from previous unzipif (Directory.Exists(destinationPath))
{
Directory.Delete(destinationPath, true);
}//unpack archive file
Archiver.Decompress(sourceFilePath, destinationPath);
I then get
FileNotFoundException: Could not find file "destinationPath" System.IO.File.GetAttributes (System.String path) (at <437ba245d8404784b9fbab9b439ac908>:0) LightBuzz.Archiver.Archiver.Decompress (System.String source, System.String destination) (at <23f315dad29243e0bbe798bc41113127>:0)
Currently I'm circumventing it by Directory.CreateDirectory(destinationPath); before Decompress, but according to logic in Decompress method it should create 'destination' directory in case it does not exist.
I suppose it's because you can't do File.GetAttributes on non-existent path.