Skip to content

Commit

Permalink
Creates a new list that contains metadata file names and extensions
Browse files Browse the repository at this point in the history
Fixes: SIRI-1028
  • Loading branch information
scireum-mbo committed Dec 10, 2024
1 parent 42ebd9b commit cff6289
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/java/sirius/kernel/commons/Files.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.nio.file.Path;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.List;
import java.util.Optional;
import java.util.regex.Pattern;

Expand All @@ -28,6 +29,18 @@ public class Files {

private static final Pattern NON_PATH_CHARACTERS = Pattern.compile("[^a-zA-Z0-9\\-.]");

/**
* Contains a list of file names and endings which are considered to be metadata.
*/
private static final List<String> METADATA_FILES = List.of(
"__MACOSX",
"thumbs.db",
".ini",
"$RECYCLE.BIN",
".sys",
".tmp",
".temp");

private Files() {
}

Expand Down

0 comments on commit cff6289

Please sign in to comment.