From 015f13c9be9e3dd9ed409229a28efdab6a8f0d64 Mon Sep 17 00:00:00 2001 From: Tuukka Lehtonen Date: Mon, 30 Oct 2017 22:04:17 +0200 Subject: [PATCH] Improved tracking robustness with temporary files refs #7551 Change-Id: I51d36a7f5ad10d627d791638c4c6320a634ec0e8 --- .../utils/datastructures/file/DirectorySizeTracker.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bundles/org.simantics.utils.datastructures/src/org/simantics/utils/datastructures/file/DirectorySizeTracker.java b/bundles/org.simantics.utils.datastructures/src/org/simantics/utils/datastructures/file/DirectorySizeTracker.java index 4746afc89..4aca5bd8d 100644 --- a/bundles/org.simantics.utils.datastructures/src/org/simantics/utils/datastructures/file/DirectorySizeTracker.java +++ b/bundles/org.simantics.utils.datastructures/src/org/simantics/utils/datastructures/file/DirectorySizeTracker.java @@ -8,6 +8,7 @@ * * Contributors: * Semantum Oy - #7330 - initial API and implementation + * Semantum Oy - #7551 - improved robustness *******************************************************************************/ package org.simantics.utils.datastructures.file; @@ -315,6 +316,9 @@ public class DirectorySizeTracker implements Runnable, Closeable { else if (attrs.isRegularFile()) { registerFile(dir, child, attrs); } + } catch (NoSuchFileException ioe) { + // Intentionally ignore. + // The file was removed before we even had a chance to process it. } catch (IOException ioe) { LOGGER.error("Failed to read attribute for path " + child, ioe); } -- 2.43.2