Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions src/Files.App/Utils/Cloud/CloudDrivesDetector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,16 @@ private static Task<IEnumerable<ICloudProvider>> DetectGenericCloudDrive()
"ProtonDrive" => CloudProviders.ProtonDrive,
"kDrive" => CloudProviders.kDrive,
"Lucid" => CloudProviders.LucidLink,
"SyncCom" => CloudProviders.SyncDrive,
"MagentaCLOUD" => CloudProviders.MagentaCloud,
_ => null,
};

if (cloudProvider is null)
continue;

var nextCloudValue = (string?)namespaceSubKey?.GetValue(string.Empty);
var ownCloudValue = (string?)clsidSubKey?.GetValue(string.Empty);
var kDriveValue = (string?)clsidSubKey?.GetValue(string.Empty);
var lucidLinkValue = (string?)clsidSubKey?.GetValue(string.Empty);
var clsidDefaultValue = (string?)clsidSubKey?.GetValue(string.Empty);

using var defaultIconKey = clsidSubKey?.OpenSubKey(@"DefaultIcon");
var iconPath = (string?)defaultIconKey?.GetValue(string.Empty);
Expand All @@ -115,10 +115,12 @@ private static Task<IEnumerable<ICloudProvider>> DetectGenericCloudDrive()
CloudProviders.AppleCloudDrive => $"iCloud Drive",
CloudProviders.AppleCloudPhotos => $"iCloud Photos",
CloudProviders.AdobeCreativeCloud => $"Creative Cloud Files",
CloudProviders.ownCloud => !string.IsNullOrEmpty(ownCloudValue) ? ownCloudValue : "ownCloud",
CloudProviders.ownCloud => !string.IsNullOrEmpty(clsidDefaultValue) ? clsidDefaultValue : "ownCloud",
CloudProviders.ProtonDrive => $"Proton Drive",
CloudProviders.kDrive => !string.IsNullOrEmpty(kDriveValue) ? kDriveValue : "kDrive",
CloudProviders.LucidLink => !string.IsNullOrEmpty(lucidLinkValue) ? lucidLinkValue : "lucidLink",
CloudProviders.kDrive => !string.IsNullOrEmpty(clsidDefaultValue) ? clsidDefaultValue : "kDrive",
CloudProviders.LucidLink => !string.IsNullOrEmpty(clsidDefaultValue) ? clsidDefaultValue : "lucidLink",
CloudProviders.SyncDrive => !string.IsNullOrEmpty(clsidDefaultValue) ? clsidDefaultValue : "Sync",
CloudProviders.MagentaCloud => !string.IsNullOrEmpty(clsidDefaultValue) ? clsidDefaultValue : "MagentaCLOUD",
_ => null
},
SyncFolder = syncedFolder,
Expand Down Expand Up @@ -349,6 +351,8 @@ private static string GetDriveType(string driveIdentifier, RegistryKey? namespac
return "ownCloud";
if (driveIdentifier.StartsWith("ProtonDrive"))
return "ProtonDrive";
if (driveIdentifier.StartsWith("SyncCom"))
return "SyncCom";

// Nextcloud specific
var appNameFromNamespace = (string?)namespaceSubKey?.GetValue("ApplicationName");
Expand Down
6 changes: 5 additions & 1 deletion src/Files.App/Utils/Cloud/CloudProviders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public enum CloudProviders

LucidLink,

kDrive
kDrive,

SyncDrive,

MagentaCloud
}
}
Loading