On 2011-11-17 at 4:25 Roderich Schupp wrote:
2011/11/17 Jarek Lubczyński<el...@elkomtech.com.pl>:
> And the point is: in the first phase of executing PAR loader looks for temp
> directory, if it doesn't exist, loader extracts archive into it and then
> runs the main script. But if something break the extraction (the user will
> press Ctrl-C for example), the archive will not execute anymore (because
> extractor will 'see' the temp dir which is broken) until the temp dir will
> be manually removed.
>
> Question is: how to avoid such effect?
Rewrite the extraction stuff:) Note that this is not a trivial task, since
extraction proceeds in several phases, split across different executables
(the name of the cache directory is passed in an evironment variable).
In theory, one could proceed as follows:
Instead of extracting to temp folder and then renaming (with the risks
therein), could the extraction code could add a marker file in the
folder when it is done? Then future invocations can tell whether the
extraction completed successfully or not.
Bob