Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create output directory when extracting archive files #6618

Merged
merged 1 commit into from Sep 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions Emby.Server.Implementations/Archiving/ZipClient.cs
Expand Up @@ -45,6 +45,7 @@ public void ExtractAll(Stream source, string targetPath, bool overwriteExistingF
options.Overwrite = true;
}

Directory.CreateDirectory(targetPath);
reader.WriteAllToDirectory(targetPath, options);
}

Expand All @@ -58,6 +59,7 @@ public void ExtractAllFromZip(Stream source, string targetPath, bool overwriteEx
Overwrite = overwriteExistingFiles
};

Directory.CreateDirectory(targetPath);
reader.WriteAllToDirectory(targetPath, options);
}

Expand All @@ -71,6 +73,7 @@ public void ExtractAllFromGz(Stream source, string targetPath, bool overwriteExi
Overwrite = overwriteExistingFiles
};

Directory.CreateDirectory(targetPath);
reader.WriteAllToDirectory(targetPath, options);
}

Expand Down Expand Up @@ -120,6 +123,7 @@ public void ExtractAllFrom7z(Stream source, string targetPath, bool overwriteExi
Overwrite = overwriteExistingFiles
};

Directory.CreateDirectory(targetPath);
reader.WriteAllToDirectory(targetPath, options);
}

Expand Down Expand Up @@ -151,6 +155,7 @@ public void ExtractAllFromTar(Stream source, string targetPath, bool overwriteEx
Overwrite = overwriteExistingFiles
};

Directory.CreateDirectory(targetPath);
reader.WriteAllToDirectory(targetPath, options);
}
}
Expand Down