Skip to content

Commit 7e03306

Browse files
Fixed Nextcloud detection (#7763)
1 parent 0cd5b3b commit 7e03306

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Files.Launcher/Helpers/CloudDrivesDetector.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ private static Task<List<CloudProvider>> DetectGenericCloudDrive()
5858
continue;
5959
}
6060

61+
//Nextcloud specific
62+
var appName = (string)namespaceKey?.GetValue("ApplicationName");
63+
if (!string.IsNullOrEmpty(appName) && appName == "Nextcloud")
64+
{
65+
driveType = appName;
66+
}
67+
6168
using var bagKey = subKey.OpenSubKey(@"Instance\InitPropertyBag");
6269
var syncedFolder = (string)bagKey?.GetValue("TargetFolderPath");
6370
if (syncedFolder == null)
@@ -86,7 +93,7 @@ private static Task<List<CloudProvider>> DetectGenericCloudDrive()
8693
{
8794
CloudProviders.Mega => $"MEGA ({Path.GetFileName(syncedFolder.TrimEnd('\\'))})",
8895
CloudProviders.AmazonDrive => $"Amazon Drive",
89-
CloudProviders.Nextcloud => $"Nextcloud",
96+
CloudProviders.Nextcloud => $"{ (!string.IsNullOrEmpty((string)namespaceKey?.GetValue("")) ? (string)namespaceKey?.GetValue(""):"Nextcloud")}",
9097
CloudProviders.Jottacloud => $"Jottacloud",
9198
_ => null
9299
},

0 commit comments

Comments
 (0)