Thread: ioNiNJA
View Single Post
Old 06-22-2012, 11:55 AM  
Yil
Too much time...
 
Join Date: May 2005
Posts: 1,194
Default

Just to be clear on the dash thing. All but the last line of a multi-line response need dashes immediately after the numeric code according to the FTP standard. When a client sees a number without a dash it knows it's got the final line and uses that number as the actual result. Thus you could do something like 200- 200- 200- 500 lines and every client would see it as a 500 and thus an error result. However humans tend to get a little confused by that so the best practice is to do what you're doing and make each line show an error like 500- 500- 500- 500 . Without the dashes on non-final lines FlashFXP and my perl FTP module both got really confused.

On the oversized incomplete dir idea, I actually don't think this is very tricky for you. Just leave things the way they are now but add the oversized tag symlink in the parent if the total number of files is greater than the number expected (and delete it if the size gets back to 100%). Leave it up to the user to delete files or whatever to make things right. The problem I have now is that the dir is already "wrong", but I don't have an easy way of knowing that. Definitely make it an option though so people can keep things the way they are if they want.
Yil is offline   Reply With Quote