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

Thiago Macieira thiago.macieira at kdemail.net
Tue Dec 16 01:31:07 GMT 2003


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":
kio (KIOJob): stat file:/tmp/a / b
kio (KIOJob): error 11 /tmp/a / b
kio (KIOJob): This seems to be a suitable case for trying to rename before 
stat+[list+]copy+del
kio (KIOJob): error 40 /tmp/a b
kio (KIOJob): Couldn't rename, reverting to normal way, starting with stat
kio (KIOJob): stat file:/tmp/a b
kio_file: FileProtocol::stat details=2
kio (KIOJob): error 40 /tmp/a b

If I try with FTP, I get:
kio_ftp: ftpSendCmd: RNFR a  b
kio_ftp: resp> 350 File or directory exists, ready for destination name.
kio_ftp:
kio_ftp: ftpSendCmd: RNTO /tmp/a / b
kio_ftp: resp> 550 Rename: No such file or directory

(same thing without the spaces, I did test)
However, if I have file "a %2f b" on disk, Konqueror displays "a / b" as the 
filename. It allows me to remove the slash, but not rename it to anything 
containing it.

Other inconsistencies: opening in KWrite shows "a %2f b" in the title bar. 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".

If I start off with " a %%%% b", it shows as "a %% b". Renaming to the same 
name changes from 4 to 2 %'s.

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.

-- 
  Thiago Macieira  -  Registered Linux user #65028
   thiagom at mail.com           
    ICQ UIN: 1967141   PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20031215/ce6ed866/attachment.sig>


More information about the kde-core-devel mailing list