Comment 3 for bug 648451

Revision history for this message
John Veness (pelago) wrote :

Being able to re-export the same program, for example after editing a config, is a useful feature and I would prefer to *not* see it blocked. But Steve's problem is a genuine one.

Usually the exported program is not added to the RSS feed until after the export is completed, and so an RSS client wouldn't download a half-exported program. In Steve's case, the problem was that, because he had already previously exported the program, it was already in his RSS feed, and when he set it to export again, it started overwriting the same file, and there is a few minutes window (depending on how long the export takes) when an RSS client could attempt to download the file in a half-finished state.

Regarding a solution, I wonder if a good fix would be to initially export the program to a temporary folder, or to the normal export folder but with a different filename, e.g. ending in ".tmp". Only when the program has completely finished exporting is the file moved to the normal export folder, or renamed to remove the .tmp, overwriting the previously-exported file if it exists. This would reduce the window when it was possible to download a half-exported program from a few minutes to just a few seconds.