if (StorageProviderSyncRootManager.IsSupported())
{
var syncRoots = StorageProviderSyncRootManager.GetCurrentSyncRoots();
foreach(StorageProviderSyncRootInfo syncRootInfo in syncRoots)
{
var cloudStorageItem = new DriveItem()
{
Root = syncRootInfo.Path as StorageFolder,
Text = syncRootInfo.DisplayNameResource,
VirtualDriveIconPath = syncRootInfo.IconResource,
Path = syncRootInfo.Path.Path,
Type = DriveType.VirtualDrive,
};
list.Add(cloudStorageItem);
}
}
Unfortunately, this code returns an ACCESS_DENIED on the first line. I have broadFileSystemAccess capability granted and the Desktop Extension properly referenced in my app manifest. Other people online are having this same problem, so I'd prefer someone knowledgeable with WinRT answer this one.