From f6d62ce1d0ed0b210f8c03982210c195f948695c Mon Sep 17 00:00:00 2001
From: Yair <39923744+yaira2@users.noreply.github.com>
Date: Sat, 9 Dec 2023 19:14:58 -0500
Subject: [PATCH] Feature: Added 2gb splitting size for archives (#14193)
---
src/Files.App/Dialogs/CreateArchiveDialog.xaml.cs | 1 +
src/Files.App/Utils/Archives/CompressArchiveModel.cs | 1 +
src/Files.Core/Data/Enums/ArchiveSplittingSizes.cs | 5 +++++
3 files changed, 7 insertions(+)
diff --git a/src/Files.App/Dialogs/CreateArchiveDialog.xaml.cs b/src/Files.App/Dialogs/CreateArchiveDialog.xaml.cs
index d0b2d1e0506a..8735da1f3706 100644
--- a/src/Files.App/Dialogs/CreateArchiveDialog.xaml.cs
+++ b/src/Files.App/Dialogs/CreateArchiveDialog.xaml.cs
@@ -189,6 +189,7 @@ public string Password
new(ArchiveSplittingSizes.Cd650, ToSizeText(650), "CD".GetLocalizedResource()),
new(ArchiveSplittingSizes.Cd700, ToSizeText(700), "CD".GetLocalizedResource()),
new(ArchiveSplittingSizes.Mo1024, ToSizeText(1024)),
+ new(ArchiveSplittingSizes.Mo2048, ToSizeText(2048)),
new(ArchiveSplittingSizes.Fat4092, ToSizeText(4092), "FAT".GetLocalizedResource()),
new(ArchiveSplittingSizes.Dvd4480, ToSizeText(4480), "DVD".GetLocalizedResource()),
new(ArchiveSplittingSizes.Mo5120, ToSizeText(5120)),
diff --git a/src/Files.App/Utils/Archives/CompressArchiveModel.cs b/src/Files.App/Utils/Archives/CompressArchiveModel.cs
index 347a2e2fda72..919b7fadd8e3 100644
--- a/src/Files.App/Utils/Archives/CompressArchiveModel.cs
+++ b/src/Files.App/Utils/Archives/CompressArchiveModel.cs
@@ -54,6 +54,7 @@ public class CompressArchiveModel : ICompressArchiveModel
ArchiveSplittingSizes.Mo10 => 10 * 1000 * 1000L,
ArchiveSplittingSizes.Mo100 => 100 * 1000 * 1000L,
ArchiveSplittingSizes.Mo1024 => 1024 * 1000 * 1000L,
+ ArchiveSplittingSizes.Mo2048 => 2048 * 1000 * 1000L,
ArchiveSplittingSizes.Mo5120 => 5120 * 1000 * 1000L,
ArchiveSplittingSizes.Fat4092 => 4092 * 1000 * 1000L,
ArchiveSplittingSizes.Cd650 => 650 * 1000 * 1000L,
diff --git a/src/Files.Core/Data/Enums/ArchiveSplittingSizes.cs b/src/Files.Core/Data/Enums/ArchiveSplittingSizes.cs
index 3762a9f7704d..9843909b3b21 100644
--- a/src/Files.Core/Data/Enums/ArchiveSplittingSizes.cs
+++ b/src/Files.Core/Data/Enums/ArchiveSplittingSizes.cs
@@ -28,6 +28,11 @@ public enum ArchiveSplittingSizes
///
Mo1024,
+ ///
+ /// Split into each 2 GB.
+ ///
+ Mo2048,
+
///
/// Split into each 5 GB.
///