Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Bug: Publish to file fails to delete old folders

Steps:
1 Publish to file
2 Delete 'Articles' folder
3 Publish to file

Expected outcome: published site has no Articles folder

Observed outcome: published site has Articles folder

Chris John Jordan
Tuesday, March 26, 2002

Yep. I've noticed this too.

Mark W
Tuesday, March 26, 2002

In order to do this we have to know which folders we create in the first place because we don't want to delete empty folders on your web server that we didn't create.  The citydesk.xml file doesn't have the necessary information in it currently, but hopefully we can fix this in a future version.

Michael H. Pryor
Tuesday, March 26, 2002

No, it is safe for you to delete any redundant folders in the target folder, just as you already delete redundant files.

Chris John Jordan
Tuesday, March 26, 2002

Unfortunately this is not the case because the folder may not have been created by us (I don't know why you would have empty folders around but its possible and its certainly not a good idea for CD to just delete them if it doesn't know that it was the program that created it).

We don't delete redundant files, just files that CD created that you have now deleted.  If you place a file on your web server in the publish location, CD correctly will not delete that file if it doesn't know anything about it (for example .htacess files, or large binary files).

Michael H. Pryor
Tuesday, March 26, 2002

> Unfortunately this is not the case because the folder may
> not have been created by us

I'd observed CD is happy to destroy files (by overwrite) not created by it, so concluded it just as OK to destroy folders (by delete) that it (currently) it does not know where created but it. But perhaps this file overwrite is also due for change...

Thanks for the explanation.

Chris John Jordan (CityDesk 1.0.27, Win95B)
Tuesday, March 26, 2002

Important files that shouldn't be overwritten can be given permissions (on *nix) that explicetly say so. Or you can have a "staging" environment, even if it's just your desktop like mine, where you can preview the site before FTP to the production server to ensure everything looks right.

Mark W
Tuesday, March 26, 2002

"I'd observed CD is happy to destroy files (by overwrite) not created by it, so concluded it just as OK to destroy folders (by delete) that it (currently) it does not know where created but it. But perhaps this file overwrite is also due for change..."

If you tell CD to publish to a directory where you have files that are named the same thing as the files in CD, then you probably understand that its going to overwrite those files.  If CD didn't do that then everytime it published it would have to tell you that every single file in your site was already on the server and ask if you wanted to overwrite every file.  Overwriting files that it created itself (or that were put there and named the same as the files in CD) is unrelated to the empty folder deletion problem.

Hopefully in a future version we can also keep track of when we create folders on the server in the citydesk.xml file and then when you delete them in citydesk we can delete them on the server.

Michael H. Pryor
Wednesday, March 27, 2002

*  Recent Topics

*  Fog Creek Home