From 1ccd6215857447512c0c98e70d75f8317a69107c Mon Sep 17 00:00:00 2001 From: j-dimension Date: Tue, 27 Aug 2024 16:05:24 +0200 Subject: [PATCH] prevent uploading macos metadata files. close #2552 --- .../documents/ScannerLocalDocumentsUploadTimerTask.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/documents/ScannerLocalDocumentsUploadTimerTask.java b/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/documents/ScannerLocalDocumentsUploadTimerTask.java index a3cdb3357..50dbb585c 100644 --- a/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/documents/ScannerLocalDocumentsUploadTimerTask.java +++ b/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/documents/ScannerLocalDocumentsUploadTimerTask.java @@ -707,6 +707,10 @@ public void run() { if(f.getName().endsWith(".uploading")) continue; + // avoid macOS metadata files + if(f.getName().toLowerCase().contains(".ds_store")) + continue; + // avoid processing files that might still be written by the scanner if((System.currentTimeMillis() - f.lastModified())<10000l) continue;