mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[FileTools] Don't write if the file already exists
This commit is contained in:
@@ -542,9 +542,12 @@ namespace SabreTools.Helper
|
|||||||
{
|
{
|
||||||
Stream tempstream = new MemoryStream();
|
Stream tempstream = new MemoryStream();
|
||||||
reader.WriteEntryTo(tempstream);
|
reader.WriteEntryTo(tempstream);
|
||||||
archive.AddEntry(destEntryName, tempstream);
|
|
||||||
|
|
||||||
archive.SaveTo(outputArchive + ".tmp", CompressionType.Deflate);
|
if (!archive.Entries.Contains(reader.Entry))
|
||||||
|
{
|
||||||
|
archive.AddEntry(destEntryName, tempstream);
|
||||||
|
archive.SaveTo(outputArchive + ".tmp", CompressionType.Deflate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user