Skip to content

Commit a85a339

Browse files
authored
Fixed an issue that prevented some folders from opening (#3461)
1 parent 0d25e56 commit a85a339

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Files/Interacts/Interaction.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,6 @@ public async Task<bool> OpenPath(string path, FilesystemItemType? itemType = nul
433433
string previousDir = AssociatedInstance.FilesystemViewModel.WorkingDirectory;
434434
bool isHiddenItem = NativeFileOperationsHelper.HasFileAttribute(path, System.IO.FileAttributes.Hidden);
435435
bool isShortcutItem = path.EndsWith(".lnk") || path.EndsWith(".url"); // Determine
436-
bool fileExists = await StorageItemHelpers.Exists(path, AssociatedInstance);
437436
FilesystemResult opened = (FilesystemResult)false;
438437

439438
// Shortcut item variables
@@ -443,11 +442,6 @@ public async Task<bool> OpenPath(string path, FilesystemItemType? itemType = nul
443442
bool shortcutRunAsAdmin = false;
444443
bool shortcutIsFolder = false;
445444

446-
if (!fileExists && !isShortcutItem && !isHiddenItem)
447-
{
448-
return false;
449-
}
450-
451445
if (itemType == null || isShortcutItem || isHiddenItem)
452446
{
453447
if (isShortcutItem)
@@ -688,7 +682,9 @@ private async void OpenSelectedItems(bool openViaApplicationPicker = false)
688682

689683
foreach (ListedItem item in AssociatedInstance.ContentPage.SelectedItems)
690684
{
691-
await OpenPath(item.ItemPath, null, false, openViaApplicationPicker);
685+
var type = item.PrimaryItemAttribute == StorageItemTypes.Folder ?
686+
FilesystemItemType.Directory : FilesystemItemType.File;
687+
await OpenPath(item.ItemPath, type, false, openViaApplicationPicker);
692688
}
693689
}
694690

0 commit comments

Comments
 (0)