From: wren a. <win...@gm...> - 2005-09-19 06:51:49
|
On 9/18/05, Tim Cooijmans <aap...@gm...> wrote: > I'm not sure if we really want to delete the *~ files. Other > application use this suffix for backups and other stuff, so we might > accidentally remove the user's data. How about we delete them if the > download fails? Yeah, I wouldn't advocate actually removing "*~", just if we're told to mess with a file $foo then there's a chance hat there's a messed up $foo already there or a messed up $foo~, so those two specific files should be wiped. Depending on where we do it in the process of moving the old $foo to $foo~ (wiping the old $foo~), and downloading the new feed into $foo will alter which of those files we actually want to get rid of. Starting out before downloading we might have an old $foo, and old $foo~, or both. After the downloading but before the parsing, the old $foo~ if any should have been removed, the old $foo should be renamed $foo~, and the newest version of the feed should be in $foo. Simplest option would be to remove $foo~ after this whole swapping but before the parsing; more complicated but potentially more efficient option would be to remove files earlier on, or maybe even to wrap all the code regarding this swapping in if(-c =3D=3D true) statements. Tomorrow I'll take a look at what you've done so far and see where we should go from there. --=20 Live well, ~wren |