Skip to content

Commit b337e2c

Browse files
committed
merge
1 parent 7b43460 commit b337e2c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/Files.App/Utils/Archives/DecompressHelper.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static async Task<bool> IsArchiveEncrypted(BaseStorageFile archive)
3434
return zipFile.ArchiveFileData.Any(file => file.Encrypted || file.Method.Contains("Crypto") || file.Method.Contains("AES"));
3535
}
3636

37-
public static async Task ExtractArchive(BaseStorageFile archive, BaseStorageFolder destinationFolder, string password, IProgress<StatusCenterItemProgressModel> progress, CancellationToken cancellationToken)
37+
public static async Task ExtractArchiveAsync(BaseStorageFile archive, BaseStorageFolder destinationFolder, string password, IProgress<StatusCenterItemProgressModel> progress, CancellationToken cancellationToken)
3838
{
3939
using SevenZipExtractor? zipFile = await GetZipFile(archive, password);
4040
if (zipFile is null)
@@ -148,7 +148,7 @@ public static async Task ExtractArchive(BaseStorageFile archive, BaseStorageFold
148148
}
149149
}
150150

151-
private static async Task ExtractArchive(BaseStorageFile archive, BaseStorageFolder? destinationFolder, string password)
151+
private static async Task ExtractArchiveAsync(BaseStorageFile archive, BaseStorageFolder? destinationFolder, string password)
152152
{
153153
if (archive is null || destinationFolder is null)
154154
return;
@@ -159,7 +159,7 @@ private static async Task ExtractArchive(BaseStorageFile archive, BaseStorageFol
159159
ReturnResult.InProgress);
160160

161161
await FilesystemTasks.Wrap(() =>
162-
ExtractArchive(archive, destinationFolder, password, banner.ProgressEventSource, banner.CancellationToken));
162+
ExtractArchiveAsync(archive, destinationFolder, password, banner.ProgressEventSource, banner.CancellationToken));
163163

164164
_statusCenterViewModel.RemoveItem(banner);
165165

@@ -169,7 +169,7 @@ await FilesystemTasks.Wrap(() =>
169169
ReturnResult.Success);
170170
}
171171

172-
public static async Task DecompressArchive(IShellPage associatedInstance)
172+
public static async Task DecompressArchiveAsync(IShellPage associatedInstance)
173173
{
174174
if (associatedInstance == null)
175175
return;
@@ -212,13 +212,13 @@ public static async Task DecompressArchive(IShellPage associatedInstance)
212212
destinationFolder = await FilesystemTasks.Wrap(() => parentFolder.CreateFolderAsync(Path.GetFileName(destinationFolderPath), CreationCollisionOption.GenerateUniqueName).AsTask());
213213
}
214214

215-
await ExtractArchive(archive, destinationFolder, password);
215+
await ExtractArchiveAsync(archive, destinationFolder, password);
216216

217217
if (decompressArchiveViewModel.OpenDestinationFolderOnCompletion)
218218
await NavigationHelpers.OpenPath(destinationFolderPath, associatedInstance, FilesystemItemType.Directory);
219219
}
220220

221-
public static async Task DecompressArchiveHere(IShellPage associatedInstance)
221+
public static async Task DecompressArchiveHereAsync(IShellPage associatedInstance)
222222
{
223223
if (associatedInstance == null)
224224
return;
@@ -229,7 +229,7 @@ public static async Task DecompressArchiveHere(IShellPage associatedInstance)
229229
BaseStorageFile archive = await StorageHelpers.ToStorageItem<BaseStorageFile>(selectedItem.ItemPath);
230230
BaseStorageFolder currentFolder = await StorageHelpers.ToStorageItem<BaseStorageFolder>(associatedInstance.FilesystemViewModel.CurrentFolder.ItemPath);
231231

232-
if (await FilesystemTasks.Wrap(() => DecompressHelper.IsArchiveEncrypted(archive)))
232+
if (await FilesystemTasks.Wrap(() => IsArchiveEncrypted(archive)))
233233
{
234234
DecompressArchiveDialog decompressArchiveDialog = new();
235235
DecompressArchiveDialogViewModel decompressArchiveViewModel = new(archive)
@@ -247,11 +247,11 @@ public static async Task DecompressArchiveHere(IShellPage associatedInstance)
247247
password = Encoding.UTF8.GetString(decompressArchiveViewModel.Password);
248248
}
249249

250-
await ExtractArchive(archive, currentFolder, password);
250+
await ExtractArchiveAsync(archive, currentFolder, password);
251251
}
252252
}
253253

254-
public static async Task DecompressArchiveToChildFolder(IShellPage associatedInstance)
254+
public static async Task DecompressArchiveToChildFolderAsync(IShellPage associatedInstance)
255255
{
256256
if (associatedInstance == null)
257257
return;
@@ -284,7 +284,7 @@ public static async Task DecompressArchiveToChildFolder(IShellPage associatedIns
284284
if (currentFolder is not null)
285285
destinationFolder = await FilesystemTasks.Wrap(() => currentFolder.CreateFolderAsync(Path.GetFileNameWithoutExtension(archive.Path), CreationCollisionOption.GenerateUniqueName).AsTask());
286286

287-
await ExtractArchive(archive, destinationFolder, password);
287+
await ExtractArchiveAsync(archive, destinationFolder, password);
288288
}
289289
}
290290
}

0 commit comments

Comments
 (0)