Skip to content

Commit d0c0a8b

Browse files
committed
Update ListedItem.cs
1 parent cfc36ea commit d0c0a8b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Files.App/Data/Items/ListedItem.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ public string ItemTooltipText
4141
tooltipBuilder.AppendLine($"{"NameWithColon".GetLocalizedResource()} {Name}");
4242
tooltipBuilder.AppendLine($"{"ItemType".GetLocalizedResource()} {itemType}");
4343
tooltipBuilder.Append($"{"ToolTipDescriptionDate".GetLocalizedResource()} {ItemDateModified}");
44-
if(!string.IsNullOrWhiteSpace(FileSize))
44+
if (!string.IsNullOrWhiteSpace(FileSize))
4545
tooltipBuilder.Append($"{Environment.NewLine}{"SizeLabel".GetLocalizedResource()} {FileSize}");
46-
if(SyncStatusUI.LoadSyncStatus)
46+
if (SyncStatusUI.LoadSyncStatus)
4747
tooltipBuilder.Append($"{Environment.NewLine}{"syncStatusColumn/Header".GetLocalizedResource()}: {syncStatusUI.SyncStatusString}");
4848

4949
return tooltipBuilder.ToString();
@@ -401,6 +401,10 @@ public void UpdateContainsFilesFolders()
401401

402402
private bool CheckElevationRights()
403403
{
404+
// Avoid downloading file to check elevation
405+
if (SyncStatusUI.SyncStatus != CloudDriveSyncStatus.FileOnline)
406+
return false;
407+
404408
return IsShortcut
405409
? ElevationHelpers.IsElevationRequired(((ShortcutItem)this).TargetPath)
406410
: ElevationHelpers.IsElevationRequired(this.ItemPath);

0 commit comments

Comments
 (0)