diff --git a/rhizome_store.c b/rhizome_store.c index 30275521..14146797 100644 --- a/rhizome_store.c +++ b/rhizome_store.c @@ -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)); diff --git a/tests/rhizomeprotocol b/tests/rhizomeprotocol index bbfec5f9..76ebb14a 100755 --- a/tests/rhizomeprotocol +++ b/tests/rhizomeprotocol @@ -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