Recognize replaced automation files and update secure watcher for 2.1.53
CI / verify (push) Canceled after 0s

This commit is contained in:
Sucukdeluxe committed 2026-10-03 11:42:30 +02:00
1 parent f2e400c89e
commit d19d7faa19
9 files changed
+89 -178

No files matched your search

+4 -3
View File
@@ -170,6 +170,7 @@
return {
path,
size,
...(typeof row.fileIdentity === 'string' && row.fileIdentity ? { fileIdentity: row.fileIdentity } : {}),
mtimeMs: Math.trunc(mtimeMs),
hoster,
completedAt: Number.isFinite(completedAt) && completedAt >= 0 ? Math.trunc(completedAt) : 0
@@ -230,7 +231,7 @@
const remaining = [];
for (const hoster of hosters) {
const row = rows.get(`${normalizePath(path)}\u0000${hoster}`);
if (row && Number.isFinite(size) && size === row.size && Number.isFinite(mtimeMs) && Math.trunc(mtimeMs) === row.mtimeMs) completed.push(hoster);
if (row && (!candidate.fileIdentity || candidate.fileIdentity === row.fileIdentity) && Number.isFinite(size) && size === row.size && Number.isFinite(mtimeMs) && Math.trunc(mtimeMs) === row.mtimeMs) completed.push(hoster);
else remaining.push(hoster);
}
if (hosters.length > 0 && remaining.length === 0) processedPaths.push(path);
@@ -316,11 +317,11 @@
if (exact && queuePaths.has(exact)) {
processedPaths.push(candidate?.path);
reasons[exact] = 'in-queue';
} else if ((exact && exactPaths.has(exact)) || (evidenceNames.has(name) && nameCounts.get(name) === 1)) {
} else if (!candidate.fileIdentity && ((exact && exactPaths.has(exact)) || (evidenceNames.has(name) && nameCounts.get(name) === 1))) {
processedPaths.push(candidate?.path);
reasons[exact] = exactPaths.has(exact) || historyNames.has(name) ? 'history' : 'upload-log';
}
else if (evidenceNames.has(name) && nameCounts.get(name) > 1) ambiguousPaths.push(candidate?.path);
else if (!candidate.fileIdentity && evidenceNames.has(name) && nameCounts.get(name) > 1) ambiguousPaths.push(candidate?.path);
else unprocessedPaths.push(candidate?.path);
}
return { processedPaths, ambiguousPaths, unprocessedPaths, reasons };