Allow creating archives from inside another archive's normalizer

Closes #1118 (closed). Two methods are added to the ServerContext class:

  • raw_path_exists, for determining if a file already exists
  • process_updated_raw_file, which tells the processing framework that a file has been added or updated. This will cause the new/update file to be matched and processed (if a parser matches it). This method is intended to be used from the normalize or parse method.

Modifying existing files is allowed, but discouraged, as care needs to be taken so that we don't get infinite loops with files modifying each other. This is why I also added the raw_path_exists method, to make it easier to check this.

Technically, the solution works by allowing child processes to be non-blocking (this is to make it possible to modify existing files. An existing file might already be processing when the processing of another file causes it to be updated. What happens then is that the modified entry will be scheduled for reprocessing, and this time it should be guaranteed to see the modified version of the mainfile. This requires the child process to be non-blocking.).

I also changed the code of a failing gui test, and it seems to have fixed the annoying problem we've had lately with seeing two "Save entry" buttons on the OverviewView page (though not entirely clear why the code fixes it).

Edited by David Sikter

Merge request reports