fix(desktop): send delivery originals without re-hashing XMP-rewritten files
After work-folder XMP writes the JPEG hash no longer matches the index. Trying local_original first re-hashed every multi-MB file and stalled the queue that was waiting on those uploads.
This commit is contained in:
1 parent
4644ee82f2
commit
9f5532c737
1 file changed
+7
-4
@@ -110,11 +110,14 @@ export class OriginalSender {
|
||||
}
|
||||
|
||||
private async sendOne(need: OriginalNeed): Promise<void> {
|
||||
const exact = await withTimeout(localOriginal(need.sha256), ORIGINAL_IPC_MS);
|
||||
let bytes: ArrayBuffer | null = exact && exact !== "timeout" ? exact : null;
|
||||
// Prefer the path that skips a full-file SHA (XMP / IPTC rewrites change the hash but keep the same
|
||||
// pixels). Trying `local_original` first re-hashes multi‑MB JPEGs only to fail, and stalls the
|
||||
// delivery queue that is waiting on these uploads.
|
||||
const changed = await withTimeout(localOriginalChanged(need.sha256), ORIGINAL_IPC_MS);
|
||||
let bytes: ArrayBuffer | null = changed && changed !== "timeout" ? changed : null;
|
||||
if (!bytes) {
|
||||
const changed = await withTimeout(localOriginalChanged(need.sha256), ORIGINAL_IPC_MS);
|
||||
bytes = changed && changed !== "timeout" ? changed : null;
|
||||
const exact = await withTimeout(localOriginal(need.sha256), ORIGINAL_IPC_MS);
|
||||
bytes = exact && exact !== "timeout" ? exact : null;
|
||||
}
|
||||
if (!bytes) return;
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user