View Single Post
Old 03-25-2007, 12:37 AM  
Yil
Too much time...
 
Join Date: May 2005
Posts: 1,194
Default OnDelDir

Quote:
Originally Posted by mr_F View Post
... i'd really like to see this bug fixed:
http://www.inicom.net/forum/showthread.php?t=8245
it STILL causes me a headache ;P
First off, I'd like to see the ACTUAL onDelDir command line from your ioFTPD.ini file because I don't think it's a plain line like OnDelDir = EXEC ..\scripts\args.exe

By default OnDelDir gets 2 arguments after the path of the script, the real directory path being deleted and the VFS path, but you have 3.

Using your example I'll show you where the error is and why it doesn't happen unless you add in the extra parameter which you shouldn't need.

..\scripts\checkscript.exe "f:\[---new---]" "f:\[---new---]\test" "/admin/f-root/[---new---]/test/"

And in the drive-root case I'm guessing you're actual command look like:

OnDelDir = %EXEC ..\scripts\args.exe %[$path]

which turns into

..\scripts\checkscript.exe f:\ "f:\shitsdfjfsdkjlfsd" "/admin/f-root/shitsdfjfsdkjlfsd/"

Notice the trailing \ in f:\ and that the expanded cookie isn't enclosed in quotes. I'm guessing you then parse the line and the \ escapes the [space] and thus the first argument runs into the second... all bets are off after that.

Or maybe it turns into

..\scripts\checkscript.exe "f:\" "f:\shitsdfjfsdkjlfsd" "/admin/f-root/shitsdfjfsdkjlfsd/"

And again the \ quotes the next character the " which then goofs everything up...

There really is no reason to need the %[$path] argument, just compute it from the directory name by removing 1 path level. Or else arrange to quote the expanded cookie safely or parse the line differently...

Last edited by Yil; 03-25-2007 at 01:15 AM.
Yil is offline   Reply With Quote