files-community / files-community/Files

Bug: Files opens folder in new window instead of the most recently created window

Open
#18,009 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
45.4k
Forks
2.9k
Avg merge
19h 1m
Merged PRs (30d)
60

Description

### Description

When you have the option "set files as the default file manager" turned on and you open a folder e.g. from the Windows Desktop, the folder should be opened in Files instead of Explorer. When there are multiple windows of Files open, the folder is opened in the most recently created window.

The problem occurs when the most recently created window is closed. Instead of opening the folder in the next most recent window, it creates a new window to open the folder in.

This problem can also be observed when using the button "Open log location" in the Files settings. I assume this is beacause the button tries to open the folder in Explorer (not sure why, I would assume opening it in the current Files window would make more sense)

### Steps To Reproduce

1. turn on "set files as the default file manager"
2. open 2 or more windows in Files
3. close the most recently created window
4. try to open a folder from your windows desktop (or any other location that should trigger Files to open the folder instead of explorer)

### Files Version

4.0.24.0

### Windows Version

10.0.26200.7462

### User ID

e96f2327-3332-4abc-ad0f-6299985c1aaa

### Log File

[debug.log](https://github.com/user-attachments/files/24401415/debug.log)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.