Bug #966

Updated by Matthieu Decorde almost 5 years ago

When an import module starts, it asks confirmation to replace original corpus.

Currently, the code seems to delete the original corpus binary.

If the import process is aborted, the original corpus is still present in the corpus view but "is not ready" in the messages bar and is not useable.

An import module abort should put a previously existing corpus back to its original state.

* rename move the original corpus binary in a temporary directory with the "_temp" suffix, directory, instead of deleting it
* if import process is finished without error then delete the temporary directory
** rename the broken corpus directory with the "_error" suffix
** restore
put the original corpus binary back into the corpora directory.