Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for annoying issue opening duplicate folders when rooted in user directory #1151

Merged
merged 1 commit into from
Oct 23, 2021

Conversation

dixonte
Copy link
Contributor

@dixonte dixonte commented Oct 16, 2021

This is a change to my previous contribution for opening and selecting files in an already open folder window where possible.

I encountered an annoying issue wherein, if the folder exists inside the user's home folder (e.g. C:\Users<username>\Dropbox), then Windows will consider the path different to the actual path to the folder.

For example:

This PC > System (C:) > Users > (username) > Dropbox

vs

(User Full Name) > Dropbox

If the user has the latter folder window open and attempts to select an open image from ImageGlass, ImageGlass passes the file path to the API which returns the above logical path, which does not match an open folder window, leading to a duplicate folder window being opened.

To get around this, I modified the method so it first attempts to iterate open folder windows for a basic path match, before continuing with the old method in the case a match cannot be found.

@d2phap d2phap merged commit 6a9ccc2 into d2phap:develop Oct 23, 2021
@d2phap
Copy link
Owner

d2phap commented Oct 23, 2021

Thanks @dixonte !

@d2phap d2phap added this to the Issues 8.2 milestone Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants