fix: prevent folder-monitor reuploads after completion
Discover base, daily, session, and fallback upload logs across configured, Desktop, and application-data locations without blocking the Electron main process. Treat in-session completion keys as authoritative automation evidence so removing finished rows cannot cause periodic reconciliation to enqueue and upload the same file again. Add real handler and done-remove-reconcile regressions covering custom extensions, mixed-case log names, fallback paths, stale evidence, and asynchronous log reads.
This commit is contained in:
+5
-1
@@ -599,9 +599,13 @@ async function evaluateAutomationCandidates(files, options = {}) {
|
||||
.map(value => String(value || '').trim())
|
||||
.filter(Boolean)));
|
||||
const { history, uploadLog } = options.evidenceSnapshot || await loadAutomationEvidenceSnapshot();
|
||||
const completedPaths = [..._completedUploadKeys].map(key => {
|
||||
const separator = key.lastIndexOf('|');
|
||||
return separator > 0 ? key.slice(0, separator) : '';
|
||||
}).filter(Boolean);
|
||||
const processed = window.AutomationControl.classifyProcessedCandidates({
|
||||
candidates: matched,
|
||||
queuePaths: [...queueJobs.map(job => job.file), ...selectedFiles.map(file => file.path)],
|
||||
queuePaths: [...queueJobs.map(job => job.file), ...selectedFiles.map(file => file.path), ...completedPaths],
|
||||
historyRows: flattenAutomationHistoryRows(history),
|
||||
uploadLogRows: uploadLog
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user