From 95a77ac2d53816327298856bb95268642b820de4 Mon Sep 17 00:00:00 2001 From: GabrielKS <23368820+GabrielKS@users.noreply.github.com> Date: Fri, 21 Jun 2024 16:37:12 -0600 Subject: [PATCH] Ignore known-benign extraneous files in simulation results --- src/core/definitions.jl | 8 ++++++++ src/simulation/simulation_results.jl | 1 + 2 files changed, 9 insertions(+) diff --git a/src/core/definitions.jl b/src/core/definitions.jl index 367fc9ba2b..409aab0a97 100644 --- a/src/core/definitions.jl +++ b/src/core/definitions.jl @@ -90,6 +90,14 @@ const KNOWN_SIMULATION_PATHS = [ "simulation_files", "simulation_partitions", ] +"If the name of an extraneous file that appears in simulation results matches one of these regexes, it is safe to ignore" +const IGNORABLE_FILES = [ + r"^\.DS_Store$", + r"^\.Trashes$", + r"^\.Trash-.*$", + r"^\.nfs.*$", + r"^[Dd]esktop.ini$", +] const RESULTS_DIR = "results" # Enums diff --git a/src/simulation/simulation_results.jl b/src/simulation/simulation_results.jl index 3a67c93ae3..b76ada8c65 100644 --- a/src/simulation/simulation_results.jl +++ b/src/simulation/simulation_results.jl @@ -1,6 +1,7 @@ function check_folder_integrity(folder::String) folder_files = readdir(folder) alien_files = setdiff(folder_files, KNOWN_SIMULATION_PATHS) + alien_files = filter(x -> !any(occursin.(IGNORABLE_FILES, x)), alien_files) if isempty(alien_files) return true else