mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Ensure directory path exists when adding a new file during ApplyDeltaPackageFast
This commit is contained in:
committed by
Caelan Sayler
parent
ab7e8fefab
commit
c5a9739e9b
@@ -76,7 +76,15 @@ namespace Velopack.Compression
|
||||
&& !pathsVisited.Contains(DIFF_SUFFIX.Replace(x, ""), StringComparer.InvariantCultureIgnoreCase))
|
||||
.ForEach(x => {
|
||||
Log.Trace($"{x} was in new package but not in old one, adding");
|
||||
File.Copy(Path.Combine(deltaPath, x), Path.Combine(workingPath, x));
|
||||
|
||||
string outputFile = Path.Combine(workingPath, x);
|
||||
string outputDirectory = Path.GetDirectoryName(outputFile)!;
|
||||
|
||||
if (!Directory.Exists(outputDirectory)) {
|
||||
Directory.CreateDirectory(outputDirectory);
|
||||
}
|
||||
|
||||
File.Copy(Path.Combine(deltaPath, x), outputFile);
|
||||
});
|
||||
|
||||
progress(95);
|
||||
|
||||
Reference in New Issue
Block a user