diff --git a/SabreTools.Helper/Tools/ArchiveTools.cs b/SabreTools.Helper/Tools/ArchiveTools.cs
index 13bafb72..476f1403 100644
--- a/SabreTools.Helper/Tools/ArchiveTools.cs
+++ b/SabreTools.Helper/Tools/ArchiveTools.cs
@@ -238,23 +238,23 @@ namespace SabreTools.Helper
///
/// Attempt to copy a file between archives
///
- /// Source archive name
- /// Destination archive name
- /// Input entry name
- /// Output entry name
+ /// Source archive name
+ /// Destination archive name
+ /// Input entry name
+ /// Output entry name
/// Logger object for file and console output
/// True if the copy was a success, false otherwise
- public static bool CopyFileBetweenArchives(string inputarc, string outputarc,
- string inentryname, string outentryname, Logger logger)
+ public static bool CopyFileBetweenArchives(string inputArchive, string outputArchive,
+ string sourceEntryName, string destEntryName, Logger logger)
{
bool success = false;
// First get the archive types
- ArchiveType? iat = GetCurrentArchiveType(inputarc, logger);
- ArchiveType? oat = (File.Exists(outputarc) ? GetCurrentArchiveType(outputarc, logger) : ArchiveType.Zip);
+ ArchiveType? iat = GetCurrentArchiveType(inputArchive, logger);
+ ArchiveType? oat = (File.Exists(outputArchive) ? GetCurrentArchiveType(outputArchive, 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) || inputarc == outputarc)
+ if (iat == null || (oat == null || oat != ArchiveType.Zip) || inputArchive == outputArchive)
{
return success;
}
@@ -263,27 +263,27 @@ namespace SabreTools.Helper
ZipArchive outarchive = null;
try
{
- reader = ReaderFactory.Open(File.OpenRead(inputarc));
+ reader = ReaderFactory.Open(File.OpenRead(inputArchive));
if (iat == ArchiveType.Zip || iat == ArchiveType.SevenZip || iat == ArchiveType.Rar)
{
while (reader.MoveToNextEntry())
{
logger.Log("Current entry name: '" + reader.Entry.Key + "'");
- if (reader.Entry != null && reader.Entry.Key.Contains(inentryname))
+ if (reader.Entry != null && reader.Entry.Key.Contains(sourceEntryName))
{
- if (!File.Exists(outputarc))
+ if (!File.Exists(outputArchive))
{
- outarchive = ZipFile.Open(outputarc, ZipArchiveMode.Create);
+ outarchive = ZipFile.Open(outputArchive, ZipArchiveMode.Create);
}
else
{
- outarchive = ZipFile.Open(outputarc, ZipArchiveMode.Update);
+ outarchive = ZipFile.Open(outputArchive, ZipArchiveMode.Update);
}
- if (outarchive.Mode == ZipArchiveMode.Create || outarchive.GetEntry(outentryname) == null)
+ if (outarchive.Mode == ZipArchiveMode.Create || outarchive.GetEntry(destEntryName) == null)
{
- ZipArchiveEntry iae = outarchive.CreateEntry(outentryname, CompressionLevel.Optimal) as ZipArchiveEntry;
+ ZipArchiveEntry iae = outarchive.CreateEntry(destEntryName, CompressionLevel.Optimal) as ZipArchiveEntry;
using (Stream iaestream = iae.Open())
{