GNOME Bugzilla – Bug 331383
Nautilus bookmark changes the duplicated local filenames to URI
Last modified: 2006-02-27 15:52:04 UTC
Please describe the problem: nautilus_window_set_title() checks whether the names are duplicated or not only so if the name is duplicated the filename is changed to URI even if the path is the local path. Steps to reproduce: 1. Create 3 folders with the same name. It should containt spaces and localized characters. e.g. mkdir "földér nåme" mkdir "földér nåme/földér nåme" mkdir "földér nåme/földér nåme/földér nåme" 2. Invoke Nautilus. Go to folder containing the first (top) folder. Now browse to the last one. Click on arrow next to the Back button - there appears an incorrect (seems truncated) folder name string. Actual results: The [Go] menu items on menu bar, back list button, and forward list button on toolbar show the URI. Expected results: Does this happen every time? Other information: I'm attaching the patch.
Created attachment 59458 [details] [review] Patch for src/nautilus-window.c Attached the patch.
Thanks for your bug report! > if the name is duplicated the filename is changed to URI even if the path is the local path. Sorry, I don't know what problem you are referring to. Maybe you could submit a screenshot showing what's wrong? Nautilus seems to behave natural for me with nested equally-named localized folders.
Created attachment 60214 [details] Snapshot before apply the patch.
Created attachment 60216 [details] Snapshot after apply the patch. OK, I attached the snapshots.
Created attachment 60227 [details] [review] Better approach OK, thanks. I see the problem, but I don't like your patch. Fiddling out an actual modification from an URI and a basename isn't very helpful, especially when it involves poking around with encodings and local filename semantics. I've tried to tackle the problem that we do more than just setting the window title in set_title by converting its retval into a gboolean, letting the child class code only run when either the bookmark name or the window title have changed. This isn't really clean, but at this stage it's probably better to modify the existing functions instead of introducing new API.
Commited.