mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-20 05:37:57 +00:00
Return PAYLOAD_STATUS_NEW if file is now missing from the store
This commit is contained in:
parent
7beab7e5d8
commit
05da181541
@ -1038,9 +1038,12 @@ enum rhizome_payload_status rhizome_open_read(struct rhizome_read *read, const r
|
||||
read->offset = 0;
|
||||
read->hash_offset = 0;
|
||||
|
||||
if (sqlite_exec_uint64(&read->length,"SELECT length FROM FILES WHERE id = ?",
|
||||
RHIZOME_FILEHASH_T, &read->id, END) == -1)
|
||||
int r = sqlite_exec_uint64(&read->length,"SELECT length FROM FILES WHERE id = ?",
|
||||
RHIZOME_FILEHASH_T, &read->id, END);
|
||||
if (r == -1)
|
||||
return RHIZOME_PAYLOAD_STATUS_ERROR;
|
||||
if (r == 0)
|
||||
return RHIZOME_PAYLOAD_STATUS_NEW;
|
||||
assert(read->length>0);
|
||||
|
||||
if (sqlite_exec_uint64(&read->blob_rowid,
|
||||
|
Loading…
Reference in New Issue
Block a user