Skip to content

Commit 1db6509

Browse files
committed
Fix spacing
1 parent 39d4fa6 commit 1db6509

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/Files.App/Services/Storage/StorageArchiveService.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
using ICSharpCode.SharpZipLib.Core;
66
using ICSharpCode.SharpZipLib.Zip;
77
using SevenZip;
8-
using System.Collections;
98
using System.IO;
10-
using System.Linq;
119
using System.Text;
1210
using UtfUnknown;
1311
using Windows.Storage;
@@ -92,7 +90,8 @@ public async Task<bool> CompressAsync(ICompressArchiveModel compressionModel)
9290
/// <inheritdoc/>
9391
public Task<bool> DecompressAsync(string archiveFilePath, string destinationFolderPath, string password = "", Encoding? encoding = null)
9492
{
95-
if(encoding == null){
93+
if (encoding == null)
94+
{
9695
return DecompressAsyncWithSevenZip(archiveFilePath, destinationFolderPath, password);
9796
}
9897
else
@@ -205,22 +204,22 @@ async Task<bool> DecompressAsyncWithSharpZipLib(string archiveFilePath, string d
205204
string.IsNullOrEmpty(destinationFolderPath))
206205
return false;
207206
using var zipFile = new ZipFile(archiveFilePath, StringCodec.FromEncoding(encoding));
208-
if(zipFile is null)
207+
if (zipFile is null)
209208
return false;
210-
211-
if(!string.IsNullOrEmpty(password))
209+
210+
if (!string.IsNullOrEmpty(password))
212211
zipFile.Password = password;
213212

214213
// Initialize a new in-progress status card
215214
var statusCard = StatusCenterHelper.AddCard_Decompress(
216215
archiveFilePath.CreateEnumerable(),
217216
destinationFolderPath.CreateEnumerable(),
218217
ReturnResult.InProgress);
219-
218+
220219
// Check if the decompress operation canceled
221220
if (statusCard.CancellationToken.IsCancellationRequested)
222221
return false;
223-
222+
224223
StatusCenterItemProgressModel fsProgress = new(
225224
statusCard.ProgressEventSource,
226225
enumerationCompleted: true,
@@ -324,7 +323,7 @@ await ThreadingService.ExecuteOnUiThreadAsync(() =>
324323
return isSuccess;
325324
}
326325

327-
326+
328327
/// <inheritdoc/>
329328
public string GenerateArchiveNameFromItems(IReadOnlyList<ListedItem> items)
330329
{
@@ -358,7 +357,7 @@ public async Task<bool> IsEncodingUndeterminedAsync(string archiveFilePath)
358357
{
359358
using (ZipFile zipFile = new ZipFile(archiveFilePath))
360359
{
361-
return !zipFile.Cast<ZipEntry>().All(entry=>entry.IsUnicodeText);
360+
return !zipFile.Cast<ZipEntry>().All(entry => entry.IsUnicodeText);
362361
}
363362
}
364363
catch (Exception ex)
@@ -380,7 +379,7 @@ public async Task<bool> IsEncodingUndeterminedAsync(string archiveFilePath)
380379
using (ZipFile zipFile = new ZipFile(archiveFilePath, StringCodec.FromEncoding(cp437)))
381380
{
382381
var fileNameBytes = cp437.GetBytes(
383-
String.Join("\n",
382+
String.Join("\n",
384383
zipFile.Cast<ZipEntry>()
385384
.Where(e => !e.IsUnicodeText)
386385
.Select(e => e.Name)

0 commit comments

Comments
 (0)