]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Improved tracking robustness with temporary files 65/1165/2
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 30 Oct 2017 20:04:17 +0000 (22:04 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 30 Oct 2017 20:06:40 +0000 (22:06 +0200)
refs #7551

Change-Id: I51d36a7f5ad10d627d791638c4c6320a634ec0e8

bundles/org.simantics.utils.datastructures/src/org/simantics/utils/datastructures/file/DirectorySizeTracker.java

index 4746afc89df044097c7cac450ebb3dfbffea2c9b..4aca5bd8db5418f6381f337dec14ba7214dd33e0 100644 (file)
@@ -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);
                                                }