Skip to content

Commit

Permalink
Removed ignored paths configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
sleroux-keep committed Dec 5, 2016
1 parent 2d4e12b commit 4559849
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 6 additions & 4 deletions src/main/java/org/roda/rodain/core/RodaIn.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,13 @@ protected Void call() throws Exception {

AppProperties.initialize();
String ignoredRaw = AppProperties.getAppConfig("app.ignoredFiles");
String[] ignored = ignoredRaw.split(",");
for (String s : ignored) {
IgnoredFilter.addIgnoreRule(s);
if(ignoredRaw!=null && !ignoredRaw.trim().equalsIgnoreCase("")){
String[] ignored = ignoredRaw.split(",");
for (String s : ignored) {
IgnoredFilter.addIgnoreRule(s);
}
}

// load the custom fonts
Font.loadFont(ClassLoader.getSystemResource("fonts/Ubuntu-Regular.ttf").toExternalForm(), 10);
Font.loadFont(ClassLoader.getSystemResource("fonts/Ubuntu-Medium.ttf").toExternalForm(), 10);
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/org/roda/rodain/utils/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -265,17 +265,19 @@ public static DescObjMetadata updateTemplate(DescObjMetadata dm) {
}

public static boolean containsAtLeastOneNotIgnoredFile(Path path) {
//LOGGER.error("containsAtLeastOneNotIgnoredFile("+path.toString()+")");
boolean res = true;
try {
if (path.toFile().listFiles().length == 0) {
res = false;
} else {
/*
ValidFilesCounter visitor = new ValidFilesCounter();
Files.walkFileTree(path, visitor);
int validFiles = visitor.getValidFiles();
if (validFiles == 0) {
res = false;
}
}*/
}
} catch (Exception e) {
LOGGER.debug("Error while checking if directory contains at least on valid file: " + e.getMessage(), e);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/properties/.app.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#########################################################
# Regular expressions separated by ',' to ignore files.
# These files won't appear in the explorer and won't be included in the SIPs
app.ignoredFiles=Thumbs.db,\\.DS_Store,\\..*
app.ignoredFiles=
app.helpEnabled=true
lastClassificationScheme=
# Force a locale, using the JVM default locale if not defined here
Expand Down

0 comments on commit 4559849

Please sign in to comment.