User:Mschiff/Slashes in Filenames: Difference between revisions

From KDE TechBase
(first draft)
No edit summary
Line 3: Line 3:
Date: 08/01/17
Date: 08/01/17


'The problem'
KDE allows filenames containing a slash (/).
KDE allows filenames containing a slash (/).
Technically it is not possible to have "/" in filenames because "/" is the filesystem path seperator.
Technically it is not possible to have "/" in filenames because "/" is the filesystem path seperator.
Line 17: Line 18:
** its not possible to have files containing %2f in the name for whatever reason even if escaped to %%2f then it would not be possible to have a file called like %%2f and be presented like that if not escaped ad %%%2f ...and so on
** its not possible to have files containing %2f in the name for whatever reason even if escaped to %%2f then it would not be possible to have a file called like %%2f and be presented like that if not escaped ad %%%2f ...and so on
** KDE is not an isolated world. People using it want to communicate to other people and to share files with them.
** KDE is not an isolated world. People using it want to communicate to other people and to share files with them.
** sending files with "/" in it to other people will always end up as apparently broken filenames on other systems if its not KDE (Gnome, XFCE, CDE, Windows, OSX). This may damage KDE's reputation in a way that people may think that KDE produces broken file(name)s now and then.
** Bad interoperability: sending files with "/" in it to other people will always end up as apparently broken filenames on other systems if its not KDE (Gnome, XFCE, CDE, Windows, OSX). This may damage KDE's reputation in a way that people may think that KDE produces broken file(name)s now and then.
** konqueror lists files and has a location bar. It is possible to access files directly through that location bar. Now if there is a file called "foo/bar" (foo%2fbar on disk) and a directory called foo containing a file called bar: what will be selected if a user enters this in the location bar? what will the user expect to hit? Wouldnt that make eval things possible? The same applies to krunner or the file-dialog
** konqueror lists files and has a location bar. It is possible to access files directly through that location bar. Now if there is a file called "foo/bar" (foo%2fbar on disk) and a directory called foo containing a file called bar: what will be selected if a user enters this in the location bar? what will the user expect to hit? Wouldnt that make eval things possible? The same applies to krunner or the file-dialog. Because of that encoded filenames have to be treated special in some places and produce an inconsistent user experience.


* Krusader shows files as they are on disk (foo%2fbar)
* Krusader shows files as they are on disk (foo%2fbar)
Line 24: Line 25:
* users often use the console to manage files in a batch
* users often use the console to manage files in a batch
* KDE is not compatible with linux coreutils (cp,mv,...) if it decodes and encodes filenames in a way that it will confuse people by the fact that files shown by "ls" look differently than files shown by dolphin or konqueror although there are just plain us-ascii characters being used for the filenames.
* KDE is not compatible with linux coreutils (cp,mv,...) if it decodes and encodes filenames in a way that it will confuse people by the fact that files shown by "ls" look differently than files shown by dolphin or konqueror although there are just plain us-ascii characters being used for the filenames.
'The solution'
I vote for just removing this feature to prevent all those problems described above.


related bugreports:
related bugreports:
* https://bugs.kde.org/show_bug.cgi?id=51306
* https://bugs.kde.org/show_bug.cgi?id=51306
* https://bugs.kde.org/show_bug.cgi?id=100516
* https://bugs.kde.org/show_bug.cgi?id=100516

Revision as of 16:09, 17 January 2008

This is about KDEs special feature of trying to allow slashes (/) in filenames.

Date: 08/01/17

'The problem' KDE allows filenames containing a slash (/). Technically it is not possible to have "/" in filenames because "/" is the filesystem path seperator. So KDE encodes filenames and saves the filename like in http URL encoding with "%2f" for every "/".

I am convinced that this behavior is a bad idea and brings a lot of trouble.

I will now try to explain why.

  • "/" is not an allowed character in filenames of UNIX filesystems
  • AFAICT there is no other known OS or Desktop Environment (DE) that allows this
  • "%2f" is a valid filename
  • Allowing "/" in filenames brings following problems:
    • its not possible to have files containing %2f in the name for whatever reason even if escaped to %%2f then it would not be possible to have a file called like %%2f and be presented like that if not escaped ad %%%2f ...and so on
    • KDE is not an isolated world. People using it want to communicate to other people and to share files with them.
    • Bad interoperability: sending files with "/" in it to other people will always end up as apparently broken filenames on other systems if its not KDE (Gnome, XFCE, CDE, Windows, OSX). This may damage KDE's reputation in a way that people may think that KDE produces broken file(name)s now and then.
    • konqueror lists files and has a location bar. It is possible to access files directly through that location bar. Now if there is a file called "foo/bar" (foo%2fbar on disk) and a directory called foo containing a file called bar: what will be selected if a user enters this in the location bar? what will the user expect to hit? Wouldnt that make eval things possible? The same applies to krunner or the file-dialog. Because of that encoded filenames have to be treated special in some places and produce an inconsistent user experience.
  • Krusader shows files as they are on disk (foo%2fbar)
  • ark shows files as they are in an archive (foo%2fbar)
  • users often use the console to manage files in a batch
  • KDE is not compatible with linux coreutils (cp,mv,...) if it decodes and encodes filenames in a way that it will confuse people by the fact that files shown by "ls" look differently than files shown by dolphin or konqueror although there are just plain us-ascii characters being used for the filenames.


'The solution' I vote for just removing this feature to prevent all those problems described above.

related bugreports: