How should we handle a forward slash "/" in new file and rename dialogs?

Mark markg85 at gmail.com
Tue Oct 30 19:56:35 GMT 2012


Hi,

I'm doing a bit of dolphin bug triaging and encountered a few bugs
already that have something to do with a "/" in a filename. See [1]
and [2]. I can see a few possible solutions here.

1. "/" is forbidden.
--------------------------------------
Since "/" is a directory seperator it might just be unwise to even
consider using it in a filename. Also, if dolphin supports this it's
by far a certainty that others support it as well.

2. Replace "/" by "⁄".
--------------------------------------
It looks like a slash but is a divider sign. This might be a workable
solution but will change the user input (a "/") to the divider symbol.

3. Allow "/" in filenames
--------------------------------------
Well, possible if we encode the slash.. But that will be dolphin
specific so i guess this is a absolute NO-GO. I do have to mention
that mac allows "/" to be in filenames. I just tried that and it works
perfectly.

If we follow Mac then we should allow "/" in filenames. Though i have
to say that it's very unlikely that all linux applications that can
handle files can handle "/" inside a filename. Therefore i'd like to
suggest that we simply forbid the use of "/" in filenames. So that is
for renaming and creating new files. Option 2 is a NO-GO from me since
with that you change the user input. Something that should not be done
in my opinion because it will cause frustration with users that don't
expect that and will cause more bug reports as well.

What's your opinion on this?

Kind regards,
Mark


[1] https://bugs.kde.org/show_bug.cgi?id=308597
[2] https://bugs.kde.org/show_bug.cgi?id=309192




More information about the kfm-devel mailing list