Skip to content

Commit af24ec1

Browse files
committed
Fix iCloud
I'm dumb
1 parent 9e2ab1a commit af24ec1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/Files.App/Helpers/CloudDrivesDetector.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ private static Task<IEnumerable<ICloudProvider>> DetectGenericCloudDrive()
7878
driveType = appName;
7979
}
8080

81+
// iCloud specific
82+
if (driveType.StartsWith("iCloudDrive"))
83+
driveType = "iCloudDrive";
84+
if (driveType.StartsWith("iCloudPhotos"))
85+
driveType = "iCloudPhotos";
86+
8187
using var bagKey = clsidSubKey.OpenSubKey(@"Instance\InitPropertyBag");
8288
var syncedFolder = (string)bagKey?.GetValue("TargetFolderPath");
8389
if (syncedFolder is null)
@@ -92,8 +98,8 @@ private static Task<IEnumerable<ICloudProvider>> DetectGenericCloudDrive()
9298
"Amazon Drive" => CloudProviders.AmazonDrive,
9399
"Nextcloud" => CloudProviders.Nextcloud,
94100
"Jottacloud" => CloudProviders.Jottacloud,
95-
"iCloudDrive!S-1-5-21-4064190285-3015957005-1528788272-1001!Personal" => CloudProviders.AppleCloudDrive,
96-
"iCloudPhotos!S-1-5-21-4064190285-3015957005-1528788272-1001!Personal" => CloudProviders.AppleCloudPhotos,
101+
"iCloudDrive" => CloudProviders.AppleCloudDrive,
102+
"iCloudPhotos" => CloudProviders.AppleCloudPhotos,
97103
_ => null,
98104
};
99105
if (driveID is null)

0 commit comments

Comments
 (0)