From: Tuukka Lehtonen Date: Mon, 30 Oct 2017 20:04:17 +0000 (+0200) Subject: Improved tracking robustness with temporary files X-Git-Tag: v1.31.0~77 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=015f13c9be9e3dd9ed409229a28efdab6a8f0d64;p=simantics%2Fplatform.git Improved tracking robustness with temporary files refs #7551 Change-Id: I51d36a7f5ad10d627d791638c4c6320a634ec0e8 --- 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); }