Bug Reports If you discover any bugs that we are not aware of, please post it here so it may be corrected. |
10-04-2003, 04:15 PM
|
#1
|
Senior Member
FlashFXP Registered User ioFTPD Scripter
Join Date: Oct 2001
Posts: 236
|
File/dir names with spaces
Since beta 5, my postdel has not worked with filenames with spaces in it. I checked the arguments coming from ioFTPD (from post dele event) and it appears that its not getting the full filename from io.
|
|
|
10-04-2003, 04:33 PM
|
#2
|
Senior Member
FlashFXP Beta Tester ioFTPD Scripter
Join Date: Aug 2003
Posts: 517
|
commandline = DELE desert combat v03.zip
PATH=d:\ioFTPD\site\crap\test
filename is "d:\ioFTPD\site\crap\test\desert combat v03.zip"
?
|
|
|
10-04-2003, 08:11 PM
|
#3
|
Disabled
FlashFXP Registered User ioFTPD Administrator
Join Date: Dec 2001
Posts: 2,230
|
Re: File/dir names with spaces
Quote:
Originally posted by StarDog
Since beta 5, my postdel has not worked with filenames with spaces in it. I checked the arguments coming from ioFTPD (from post dele event) and it appears that its not getting the full filename from io.
|
I need more details... what arguments it gets, and so on
|
|
|
10-05-2003, 08:56 AM
|
#4
|
Posse Member
Ultimate Scripter ioFTPD Administrator
Join Date: Dec 2002
Posts: 1,956
|
Seems to work ok here (5.1.5):
[09:55:48] DELE Site Kill test spaces.txt
[09:55:48] Current dir is D:\ioFTPD\scripts
[09:55:48] ====================
[09:55:48] # of arguments: 7
[09:55:48] [0] = ..\scripts\ioBanana.exe
[09:55:48] [1] = zsdel
[09:55:48] [2] = DELE
[09:55:48] [3] = Site
[09:55:49] [4] = Kill
[09:55:49] [5] = test
[09:55:49] [6] = spaces.txt
[09:55:49] ====================
[09:55:49] ioBanana Process Time: 180 ms
[09:55:49] exit: 0
[09:55:49] 250 DELE command successful.
I just echo the args I receive when ioB starts.
|
|
|
10-05-2003, 12:20 PM
|
#5
|
Registered User
Join Date: Sep 2003
Posts: 46
|
hey,
while we're on the subject, the way arguments are passed by ioftpd:
some.exe <realpath> <CRC> <virtual path>
well if either of these have spaces in them you can't determine which is which , so i was wondering if you could make a quick fix and surround the arg's with " ", therefore forcing it to be exactly one argument.
hope you take this into consideration
laters ,
fr0z3n
|
|
|
10-05-2003, 01:20 PM
|
#6
|
Senior Member
FlashFXP Registered User ioFTPD Scripter
Join Date: Oct 2001
Posts: 236
|
Quote:
Originally posted by Mouton
Seems to work ok here (5.1.5):
[09:55:48] DELE Site Kill test spaces.txt
[09:55:48] Current dir is D:\ioFTPD\scripts
[09:55:48] ====================
[09:55:48] # of arguments: 7
[09:55:48] [0] = ..\scripts\ioBanana.exe
[09:55:48] [1] = zsdel
[09:55:48] [2] = DELE
[09:55:48] [3] = Site
[09:55:49] [4] = Kill
[09:55:49] [5] = test
[09:55:49] [6] = spaces.txt
[09:55:49] ====================
[09:55:49] ioBanana Process Time: 180 ms
[09:55:49] exit: 0
[09:55:49] 250 DELE command successful.
I just echo the args I receive when ioB starts.
|
Thats the problem right there, each part of your filename is an argument! you should have 4 args(..\scripts\ioBanana.exe, zsdel, DELE, and "Site Kill test spaces.txt")
|
|
|
10-05-2003, 08:07 PM
|
#7
|
Posse Member
Ultimate Scripter ioFTPD Administrator
Join Date: Dec 2002
Posts: 1,956
|
Welcome to the world of ioftpd script...
same happen OnUploadComplete, etc.
all filenames with spaces are passed without double-quotes, as fr0z3n pointed out... so until dark fixes that, u'll have to concatenate all args to make your filename...
you can use regexp for OnUploadComplete to get all 3 arguments correctly...
Not that easy, but only way i found to make it work.
|
|
|
10-05-2003, 09:08 PM
|
#8
|
Disabled
FlashFXP Registered User ioFTPD Administrator
Join Date: Dec 2001
Posts: 2,230
|
OnUploadComplete has quotes, only PRE/POST events don't.. as daemon has no clue what arguments they contain (which argument is filename & which is parameter)
OnUploadComplete/Error/DownloadComplete/Error argument formatting from sources:
wsprintf(szArgs, "\"%s\" %08X \"%s\"", szFileName, ~lpData->u32Crc, lpData->File.pwd);
|
|
|
10-05-2003, 09:50 PM
|
#9
|
Registered User
Join Date: Sep 2003
Posts: 46
|
Quote:
Originally posted by darkone
OnUploadComplete has quotes, only PRE/POST events don't.. as daemon has no clue what arguments they contain (which argument is filename & which is parameter)
OnUploadComplete/Error/DownloadComplete/Error argument formatting from sources:
wsprintf(szArgs, "\"%s\" %08X \"%s\"", szFileName, ~lpData->u32Crc, lpData->File.pwd);
|
hey,
was that added recently? because when I was testing on 4.9.4u i didn't see that, each space was considered a seperate argument
fr0z3n
|
|
|
10-06-2003, 08:40 AM
|
#10
|
Posse Member
Ultimate Scripter ioFTPD Administrator
Join Date: Dec 2002
Posts: 1,956
|
Indeed. That has been fixed.
[09:38:55] STOR TOMB RAIDER SAVES.zip
[09:38:57] Current dir is D:\ioFTPD\scripts
[09:38:57] ====================
[09:38:57] # of arguments: 6
[09:38:57] [0] = ..\scripts\ioBanana.exe
[09:38:57] [1] = pre_stor
[09:38:57] [2] = STOR
[09:38:57] [3] = TOMB
[09:38:57] [4] = RAIDER
[09:38:57] [5] = SAVES.zip
[09:38:57] ====================
[09:38:58] 150 Opening BINARY mode data connection for TOMB RAIDER SAVES.zip.
[09:38:59] Transferred: TOMB RAIDER SAVES.zip 941 KB in 16:08:28 (0.02 KBps)
[09:38:59] 226-Current dir is D:\ioFTPD\scripts
[09:38:59] 226-====================
[09:38:59] 226-# of arguments: 5
[09:38:59] 226-[0] = ..\scripts\ioBanana.exe
[09:38:59] 226-[1] = upload
[09:38:59] 226-[2] = F:\Test\TOMB RAIDER SAVES.zip
[09:38:59] 226-[3] = 5822BBD0
[09:38:59] 226-[4] = /temp/TOMB RAIDER SAVES.zip
[09:38:59] 226-====================
|
|
|
10-06-2003, 04:39 PM
|
#11
|
Registered User
Join Date: Sep 2003
Posts: 46
|
awesome
thanks,
fr0z3n
|
|
|
10-06-2003, 08:42 PM
|
#12
|
Senior Member
FlashFXP Registered User ioFTPD Scripter
Join Date: Oct 2001
Posts: 236
|
Quote:
Originally posted by fr0z3n
hey,
was that added recently? because when I was testing on 4.9.4u i didn't see that, each space was considered a seperate argument
fr0z3n
|
The OnUploadComplete event's always been like that. I could have sworn that the POST commands were like that too, but now that I think of it, I probably never verified that. No big deal, I can live with it like this..
|
|
|
10-07-2003, 07:58 PM
|
#13
|
Posse Member
Ultimate Scripter ioFTPD Administrator
Join Date: Dec 2002
Posts: 1,956
|
eheheh
the OnUploadComplete event was changed to that very recently.
I had to make a regexp algo just to fix that thing when i developped ioB and was trying to make it compatible with filenames with spaces.
i'm 100% sure aboot that.
anyhow, it's fixed now. so cool. I'll get back to c++ builder now!
|
|
|
Thread Tools |
|
Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:28 PM.
|