! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Thunar can autocomplete incorrect folders.
Status:
RESOLVED: FIXED

Comments

Description Hussam Al-Tayeb 2019-12-10 10:19:12 CET
1) Create folders FolderA and DirectoryB in your home dir.
2) In the pathbar, type /home/yourusername/ and thunar will suggest existing folders.
3) Type FolderA in the pathbar and use the arrow keys to highlight DirectoryB.
4) Press Enter key on your keyboard.
5) Thunar attempts to open /home/yourusername/FolderA/DirectoryB.
Comment 1 Hussam Al-Tayeb 2019-12-10 15:36:02 CET
Created attachment 9302 
Screenshot to demonstrate bug.

In the attached screenshot, pressing Enter tries to open "/home/hussam/cache/Public" (an invalid path) instead of "/home/hussam/Public" or "/home/hussam/cache".
Comment 2 Hussam Al-Tayeb 2019-12-10 19:47:54 CET
(In reply to Hussam Al-Tayeb from comment #0)
> 1) Create folders FolderA and DirectoryB in your home dir.
> 2) In the pathbar, type /home/yourusername/ and thunar will suggest existing
> folders.
> 3) Type FolderA in the pathbar and use the arrow keys to highlight
> DirectoryB.
> 4) Press Enter key on your keyboard.
> 5) Thunar attempts to open /home/yourusername/FolderA/DirectoryB.

I also just noticed something in addition to the above notes. Shouldn't it filter out DirectoryB from the autocomplete list after I have typed F in FolderA since DirectoryB does not begin with F?
Comment 3 Hussam Al-Tayeb 2019-12-10 20:34:56 CET
Ok, I figured out what is happening.
There are more than one issue.
First of all, filtering is broken.

If I type D, it shows only Desktop and Downloads (two items).
But if I type M for Music, it shows all the entries including invalid ones.
Unfortunately, I do not know how to fix that. Can someone on irc direct me to the path bar filtering code?
Comment 4 alexxcons editbugs 2019-12-10 21:42:18 CET
(In reply to Hussam Al-Tayeb from comment #0)
> 1) Create folders FolderA and DirectoryB in your home dir.
> 2) In the pathbar, type /home/yourusername/ and thunar will suggest existing
> folders.
> 3) Type FolderA in the pathbar and use the arrow keys to highlight
> DirectoryB.
> 4) Press Enter key on your keyboard.
> 5) Thunar attempts to open /home/yourusername/FolderA/DirectoryB.

Thanks for reporting !  I can reproduce the bug.

(In reply to Hussam Al-Tayeb from comment #3)
> If I type D, it shows only Desktop and Downloads (two items).
> But if I type M for Music, it shows all the entries including invalid ones.
I agree that only "Music" should be shown. In addition it would be nice to directly enter the next hieracy level when pressing "right".

> Unfortunately, I do not know how to fix that. Can someone on irc direct me
> to the path bar filtering code?
Sorry, no idea, so far I did not touch that part of thunar.
Comment 5 Theo Linkspfeifer editbugs 2019-12-15 14:14:28 CET
Thunar adds a trailing slash to a (completed) directory path, but that affects the following check:
https://git.xfce.org/xfce/thunar/tree/thunar/thunar-path-entry.c#n915
Comment 6 Theo Linkspfeifer editbugs 2020-02-18 12:48:15 CET
Created attachment 9470 
patch

Does this small fix resolve the problems?
Comment 7 Andre Miranda editbugs 2020-02-18 17:53:20 CET
Looks good to me, no regressions noticed, thanks.
@alexxcons wanna give a try before pushing to master?
Comment 8 alexxcons editbugs 2020-02-18 18:39:11 CET
(In reply to Andre Miranda from comment #7)
> Looks good to me, no regressions noticed, thanks.
> @alexxcons wanna give a try before pushing to master?

Patch looks good to me, please go ahead !

Thanks for the fix, Theo !
Comment 9 Git Bot editbugs 2020-02-19 07:21:40 CET
Theo Linkspfeifer referenced this bugreport in commit 90c226d8e2c4f18e1fc362773490b80aa22781d8

Fix pathbar match filtering (Bug #16267)

https://git.xfce.org/xfce/thunar/commit?id=90c226d8e2c4f18e1fc362773490b80aa22781d8
Comment 10 Git Bot editbugs 2020-02-19 07:22:32 CET
Theo Linkspfeifer referenced this bugreport in commit 81bd5401c5f9573ef644bdbe01d23879149dd63f

Fix pathbar match filtering (Bug #16267)

https://git.xfce.org/xfce/thunar/commit?id=81bd5401c5f9573ef644bdbe01d23879149dd63f
Comment 11 Andre Miranda editbugs 2020-02-19 07:23:59 CET
Pushed to both branches with minor code style changes, thank you Theo.

Bug #16267

Reported by:
Hussam Al-Tayeb
Reported on: 2019-12-10
Last modified on: 2020-02-19

People

Assignee:
Xfce Bug Triage
CC List:
4 users

Version

Attachments

Screenshot to demonstrate bug. (54.94 KB, image/png)
2019-12-10 15:36 CET , Hussam Al-Tayeb
no flags
patch (1.93 KB, patch)
2020-02-18 12:48 CET , Theo Linkspfeifer
no flags

Additional information