Skip to content

Commit a6680c7

Browse files
authored
Fix CS1998 warnings (async method lacks 'await') (#7114)
1 parent 46b0270 commit a6680c7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Files/Filesystem/StorageItems/ZipStorageFile.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -324,22 +324,22 @@ public override IAsyncOperation<BaseStorageFolder> GetParentAsync()
324324

325325
public static IAsyncOperation<BaseStorageFile> FromPathAsync(string path)
326326
{
327-
return AsyncInfo.Run<BaseStorageFile>(async (cancellationToken) =>
327+
return AsyncInfo.Run<BaseStorageFile>(cancellationToken =>
328328
{
329329
var marker = path.IndexOf(".zip", StringComparison.OrdinalIgnoreCase);
330330
if (marker != -1)
331331
{
332332
var containerPath = path.Substring(0, marker + ".zip".Length);
333333
if (path == containerPath)
334334
{
335-
return null; // Root
335+
return Task.FromResult<BaseStorageFile>(null); // Root
336336
}
337337
if (CheckAccess(containerPath))
338338
{
339-
return new ZipStorageFile(path, containerPath);
339+
return Task.FromResult<BaseStorageFile>(new ZipStorageFile(path, containerPath));
340340
}
341341
}
342-
return null;
342+
return Task.FromResult<BaseStorageFile>(null);
343343
});
344344
}
345345

@@ -375,8 +375,8 @@ private IAsyncOperation<ZipFile> OpenZipFileAsync(FileAccessMode accessMode, boo
375375
}
376376
else
377377
{
378-
var hFile = openProtected ?
379-
await NativeFileOperationsHelper.OpenProtectedFileForRead(ContainerPath) :
378+
var hFile = openProtected ?
379+
await NativeFileOperationsHelper.OpenProtectedFileForRead(ContainerPath) :
380380
NativeFileOperationsHelper.OpenFileForRead(ContainerPath, readWrite);
381381
if (hFile.IsInvalid)
382382
{

0 commit comments

Comments
 (0)