PDA

View Full Version : []'s in filenames don't work right


Yil
09-17-2005, 07:21 PM
For some reason any use of []'s in a directory name totally breaks cwd/ls (maybe others) if use specify a path. I can't remember if []'s in a filename also breaks retr's with a path or not...

Dir setup
/:
[TestDir]
Dir1

/Dir1:
[Dir2]
Dir3


this works from root:
cwd [TestDir]
cwd /Dir1
cwd /Dir1/Dir3

these don't
cwd /[TestDir]
cwd /Dir1/[Dir2]

replace cwd with list -al and the same thing is true.


Just so I wasn't crazy I tried serv-u and it works file. Clearly ioftpd is doing something funky with the []'s. I have no scripts setup on cwd/list but I figured TCL's use of ['s is a likely culprit...

I should specify how it doesn't work. cwd returns an error saying the directory doesn't exist, but list is worse because ioftpd returns a successful return code, but sends 0 bytes for the directory listing itself!

Yil
09-18-2005, 05:11 AM
Small oops. list -al IS broken and sends 0 bytes no matter what's in the directory as I said but I must have goofed the cwd test somehow... I was using existing dirs on my ftp and their names were more complex so I must have entered it wrong and ioftpd was probably right in saying it failed hehe.

Anyway, I realized there is no way cwd with a directory path with []'s could fail because I've used flash/etc to download from dirs and seen it work... hence the double check. list -al with a path containing either [ or ] fails in my perl script and in flash. Sorry for the confusion, just test with list...

Oh, and any chance of supporting ls -alR ? :)

_panic_
09-18-2005, 07:57 AM
Oh, and any chance of supporting ls -alR ? :)

the chances are that we'll do ls -alR before SSCN (fxp over ssl) (http://www.inicom.net/forum/showthread.php?t=11544), at least!