Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Publishing Bug (ftp)

So I have a few big files on this site (a personal site) and I'm replacing one on the site. The two files have different filesnames. I publish - one file is deleted, and one starts uploading. I'm on an ADSL so my upload is slow, and I get tired (it's late) and I cancel the upload.

What happens here? Well, my citydesk.xml file doesn't get updated. A file on the server no longer exists, but the citydesk.xml thinks it's there.

The next time I publish it, CityDesk tries to delete it, but it isn't there. The publishing process stops cold in it's tracks.

I created a false 0kb version of the file and upload it to the server tricking CityDesk into think it's there. My other option is to delete the citydesk.xml file, but then I'd have to republish *every* file again.

Neither solution would occur to, or be within the means of, a less technically proficient user.

Mark W
Tuesday, April 16, 2002

If you issue a DEL command to an ftp server for an unknown file, should it crash? I would think the ftp server would just give an error, but yet continue to respond...

Michael H. Pryor
Tuesday, April 16, 2002

The FTP server did give some sort of error (as reported by CityDesk), but CityDesk stopped.

Mark W
Tuesday, April 16, 2002

CityDesk just ignores those errors, so the FTP server must have closed the connection.  I've seen this happen before at geocities, but only the very first time you published.  After that it was fine.  I don't think the FTP server should disconnect if the file isn't there...

You can check this by ftp'ing from the command line, saying DEL lakjdsldjf, and then trying to do an LS.  If it says the connection is closed, then the ftp server is configured to kick you off if you try to delete a file that isn't there.  FTP doesn't have a way of saying EXISTS file, (you'd just have to parse the LS command).

Michael H. Pryor
Tuesday, April 16, 2002

"DEL lakjdsldjf"

is that a techinical term? =)

Mark W
Tuesday, April 16, 2002

LIST
150 Opening ASCII mode data connection for /bin/ls.
226 Listing completed.
del assetset
550 No such file.


i actually typed that word randomly....

Mark W
Wednesday, April 17, 2002

You need to do it in the OTHER order...
DEL randomfile first
then LS

to see if the connection is broken (because that's all CD is doing, and from what you are telling me, it looks like the ftp server is breaking the connection)

Michael H. Pryor
Thursday, April 18, 2002

Err.  Forget it... I'm a dummy... I apologize... it is a "bug"... we are looking at the return code for the delete and stopping if its not there...

Schedule for fix in a future version.

Michael H. Pryor
Thursday, April 18, 2002

darn, I had just actually done it:

ftp> del asdf
550 No such file.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
226 Listing completed.
ftp>

(there was nothing in the directory)

good to see I'm not crazy!

Mark W
Friday, April 19, 2002

*  Recent Topics

*  Fog Creek Home