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.
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".
(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?
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?
(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.
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
Created attachment 9470 patch Does this small fix resolve the problems?
Looks good to me, no regressions noticed, thanks. @alexxcons wanna give a try before pushing to master?
(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 !
Theo Linkspfeifer referenced this bugreport in commit 90c226d8e2c4f18e1fc362773490b80aa22781d8 Fix pathbar match filtering (Bug #16267) https://git.xfce.org/xfce/thunar/commit?id=90c226d8e2c4f18e1fc362773490b80aa22781d8
Theo Linkspfeifer referenced this bugreport in commit 81bd5401c5f9573ef644bdbe01d23879149dd63f Fix pathbar match filtering (Bug #16267) https://git.xfce.org/xfce/thunar/commit?id=81bd5401c5f9573ef644bdbe01d23879149dd63f
Pushed to both branches with minor code style changes, thank you Theo.