Skip to content
Merged
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
10 changes: 3 additions & 7 deletions Files/Interacts/Interaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ public async Task<bool> OpenPath(string path, FilesystemItemType? itemType = nul
string previousDir = AssociatedInstance.FilesystemViewModel.WorkingDirectory;
bool isHiddenItem = NativeFileOperationsHelper.HasFileAttribute(path, System.IO.FileAttributes.Hidden);
bool isShortcutItem = path.EndsWith(".lnk") || path.EndsWith(".url"); // Determine
bool fileExists = await StorageItemHelpers.Exists(path, AssociatedInstance);
FilesystemResult opened = (FilesystemResult)false;

// Shortcut item variables
Expand All @@ -439,11 +438,6 @@ public async Task<bool> OpenPath(string path, FilesystemItemType? itemType = nul
bool shortcutRunAsAdmin = false;
bool shortcutIsFolder = false;

if (!fileExists && !isShortcutItem && !isHiddenItem)
{
return false;
}

if (itemType == null || isShortcutItem || isHiddenItem)
{
if (isShortcutItem)
Expand Down Expand Up @@ -684,7 +678,9 @@ private async void OpenSelectedItems(bool openViaApplicationPicker = false)

foreach (ListedItem item in AssociatedInstance.ContentPage.SelectedItems)
{
await OpenPath(item.ItemPath, null, false, openViaApplicationPicker);
var type = item.PrimaryItemAttribute == StorageItemTypes.Folder ?
FilesystemItemType.Directory : FilesystemItemType.File;
await OpenPath(item.ItemPath, type, false, openViaApplicationPicker);
}
}

Expand Down