Skip to content

Commit f8b0984

Browse files
Lamparteryair100
authored andcommitted
Respond to Copilot comment
(just a general readability refactor, no impact made)
1 parent 729565d commit f8b0984

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/Files.App/Actions/Content/Archives/Decompress/BaseDecompressArchiveAction.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,8 @@ protected async Task DecompressArchiveHereAsync(bool smart = false)
9797
return null;
9898

9999
var parts = fileName.Split(['/', '\\'], StringSplitOptions.RemoveEmptyEntries);
100-
foreach (var part in parts)
101-
{
102-
if (part is "." or "..")
103-
continue;
100+
foreach (var part in parts.Where(part => part is not "." and not ".."))
104101
return part;
105-
}
106102

107103
return null;
108104
}

0 commit comments

Comments
 (0)