Skip to content

Commit 58874bd

Browse files
committed
Fix "simplify indexing" warnings
1 parent ea243ad commit 58874bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Files.App/Utils/Cloud/Detector/LucidLinkCloudDetector.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ private async IAsyncEnumerable<ICloudProvider> GetProvidersFromDirectory(string
3636
if (IsSymlink(subDirectory))
3737
{
3838
string[] orgNameFilespaceName = subDirectory.Split("\\");
39-
string path = Path.Combine($@"{Constants.UserEnvironmentPaths.SystemDrivePath}\Volumes", orgNameFilespaceName[orgNameFilespaceName.Length - 1], orgNameFilespaceName[orgNameFilespaceName.Length - 2]);
40-
string filespaceName = orgNameFilespaceName[orgNameFilespaceName.Length - 2];
39+
string path = Path.Combine($@"{Constants.UserEnvironmentPaths.SystemDrivePath}\Volumes", orgNameFilespaceName[^1], orgNameFilespaceName[^2]);
40+
string filespaceName = orgNameFilespaceName[^2];
4141

4242
StorageFile iconFile = await FilesystemTasks.Wrap(() => StorageFile.GetFileFromPathAsync(iconPath).AsTask());
4343

0 commit comments

Comments
 (0)