How to display file names

David Faure faure at kde.org
Fri Dec 19 08:42:54 GMT 2003


On Wednesday 17 December 2003 11:00, Waldo Bastian wrote:
> On Tue December 16 2003 23:13, Rolf Magnus wrote:
> > On Monday 15 December 2003 10:09, David Faure wrote:
> > > If you create a file in KDE which is named "blah %2F foo"
> > > you'll get %252F on the filesystem. This gives a slight incompatibility
> > > with the filesystem like you found above, but it allows users to use
> > > _any_ character in filenames, including slash. KDE: accept no limitations
> > > :)
> >
> > I don't think this is a good idea. The inconsistancies when doing this kind
> > of encoding are worse than not allowing / in file names, IMHO.

As I replied to Rolf (in private, since his reply was initially private,
apparently by mistake), all those problems only happen in the filedialog,
where a path is expected. It would be better to show %2F in the filedialog's
listview indeed, so that one knows he has to type %2F.
The '/ in filename' thing only works when filenames alone are dealt with,
like in konqueror's iconview/listview, not when one has to type a "filename or path".

> Yes, I agree. I think we should seriously reconsider the current approach of
> konqueror. It shouldn't be too hard for CD rippers to replace '/' with '-'.

Ah well. I've been defending Torben's idea for a long time, but I guess I don't
really object too much. There were several ideas behind it:
* initially it was for bookmarks like "http://www.kde.org/.desktop", not a problem
anymore since bookmarks are not .desktop files anymore.
* then it was convenient for links on the desktop named http://www.kde.org/,
but this is now possible by setting the Name field. We will need to add special code
for this though, since right now we set the filename and the Name field to the
same thing when the user renames the item.
* I also found it convenient for the kio_audiocd case, but this is indeed easy
to change (by using '-').
So I accept the change, but it will have to be done properly, especially for the
desktop icons case. Maybe post-3.2 would be safer. (and I don't have time this month)

> E.g. the current behavior of "New folder..." -> "/tmp/test" in konqueror is
> quite surprising.

I guess a test for startsWith('/') would allow to read the user's mind a bit better.

-- 
David FAURE, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list