[ArchiveTools] Add check for input and output archive being the same

This commit is contained in:
Matt Nadareski
2016-06-15 16:36:08 -07:00
parent 61b1deb2d8
commit 3ae94d7766

View File

@@ -248,7 +248,7 @@ namespace SabreTools.Helper
ArchiveType? oat = (File.Exists(outputarc) ? GetCurrentArchiveType(outputarc, logger) : ArchiveType.Zip);
// If we got back null (or the output is not a Zipfile), then it's not an archive, so we we return
if (iat == null || (oat == null || oat != ArchiveType.Zip))
if (iat == null || (oat == null || oat != ArchiveType.Zip) || inputarc == outputarc)
{
return success;
}