mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-04-13 13:53:16 +00:00
Remove orphan file rows if we notice the payload is missing
This commit is contained in:
parent
880117f6db
commit
974c87adf2
@ -792,6 +792,8 @@ enum rhizome_payload_status rhizome_open_read(struct rhizome_read *read, const r
|
||||
if (errno == ENOENT) {
|
||||
if (config.debug.externalblobs)
|
||||
DEBUGF("Stored file does not exist: %s", blob_path);
|
||||
// make sure we remove an orphan file row
|
||||
rhizome_delete_file(&read->id);
|
||||
return RHIZOME_PAYLOAD_STATUS_NEW;
|
||||
}
|
||||
WHYF_perror("open(%s)", alloca_str_toprint(blob_path));
|
||||
|
@ -478,7 +478,7 @@ setup_MissingPayload() {
|
||||
test_MissingPayload() {
|
||||
set_instance +A
|
||||
rm $SERVALINSTANCE_PATH/$FILEHASH
|
||||
execute --exit-status=255 $servald rhizome extract file $BID file1a
|
||||
execute --exit-status=1 $servald rhizome extract file $BID file1a
|
||||
stop_servald_server
|
||||
start_servald_server
|
||||
wait_until grep -i "Stored file $FILEHASH" $LOGA
|
||||
|
Loading…
x
Reference in New Issue
Block a user