'/' in filenames (was: How to display file names)

David Faure dfaure at klaralvdalens-datakonsult.se
Tue Dec 16 16:59:29 GMT 2003


On Tuesday 16 December 2003 02:31, Thiago Macieira wrote:
> Thiago Macieira wrote:
> > But I think it needs a bit of revision because it's
> > inconsistent. I, for one, would oppose allowing '/' in filenames because it
> > creates other
> >inconsistencies.
> 
> It's still wacky. It seems Konqueror understands the slashes in filenames, 
> displays the filenames by converting the slashes, but it doesn't allow you to 
> add it. For instance, I have file "a b" and I want to rename it to "a / b":
Bug, konq should KIO::encodeFileName the new name.
Hmm, actually KonqIconViewWidget::slotItemRenamed does this already.
Is this a listview bug? Or maybe a kpropertiesdialog bug?

> Other inconsistencies: opening in KWrite shows "a %2f b" in the title bar. 
That's actually correct, if it shows the full path.
If it shows only the filename, then indeed it would look nicer decoded.

> I  suspect; opening in KWord shows "/tmp/a %252f b" in the titlebar; opening in 
> KEdit shows "/tmp/a %2f b". KWord obviously has a bug there (it happens for 
> "a %2e b" too but not "a % b"), while the others just inconsistencies.
> 
> Also: I have file "a %%% b" on disk. Konqueror shows as "a %% b". If I hit F2 
> then Enter, the file gets renamed to "a %% b", but Konqueror now shows "a % 
> b". If I repeat the process (F2 to rename, then Enter), it gets renamed to "a 
> % b".
Will be fixed by the above.

> Are you going to tell me that that's the expected behaviour? Right now, I 
> can't produce any filenames with slashes in any Konqueror application, unless 
> I write %2f myself.
Try e.g. extracting files from an audiocd where CDDB says the songs have '/'
in their name.

-- 
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions




More information about the kde-core-devel mailing list