From 9f3b99aaf419f80c0096272c16026b951da2c5bd Mon Sep 17 00:00:00 2001 From: KillzXGaming Date: Thu, 30 Jan 2020 19:04:18 -0500 Subject: [PATCH] Disable apak file adding until file hashes can be calculated --- File_Format_Library/FileFormats/Archives/APAK.cs | 2 +- .../Interfaces/FileFormatting/IArchiveFile.cs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/File_Format_Library/FileFormats/Archives/APAK.cs b/File_Format_Library/FileFormats/Archives/APAK.cs index de21dd96..697547e5 100644 --- a/File_Format_Library/FileFormats/Archives/APAK.cs +++ b/File_Format_Library/FileFormats/Archives/APAK.cs @@ -46,7 +46,7 @@ namespace FirstPlugin public void ClearFiles() { files.Clear(); } - public bool CanAddFiles { get; set; } = true; + public bool CanAddFiles { get; set; } = false; public bool CanRenameFiles { get; set; } = true; public bool CanReplaceFiles { get; set; } = true; public bool CanDeleteFiles { get; set; } = true; diff --git a/Switch_Toolbox_Library/Interfaces/FileFormatting/IArchiveFile.cs b/Switch_Toolbox_Library/Interfaces/FileFormatting/IArchiveFile.cs index 66a00eda..9c49f54c 100644 --- a/Switch_Toolbox_Library/Interfaces/FileFormatting/IArchiveFile.cs +++ b/Switch_Toolbox_Library/Interfaces/FileFormatting/IArchiveFile.cs @@ -304,7 +304,7 @@ namespace Toolbox.Library { new STToolStripItem("Save", SaveAction) { Enabled = ((IFileFormat)ArchiveFile).CanSave}, new STToolStripSeparator(), - new STToolStripItem("Repack", RepackAction){ Enabled = ArchiveFile.CanReplaceFiles}, + new STToolStripItem("Repack", RepackAction){ Enabled = ArchiveFile.CanAddFiles }, new STToolStripItem("Extract All", ExtractAllAction), new STToolStripSeparator(), new STToolStripItem("Preview Archive", PreviewAction), @@ -573,8 +573,6 @@ namespace Toolbox.Library } else //Else create directories by filename paths { - - int I = 0; foreach (var node in archiveFile.Files) { if (!node.CanLoadFile)