Skip to content

Commit

Permalink
Merge pull request DSpace#9580 from saschaszott/patch-37
Browse files Browse the repository at this point in the history
improve interoperability: replace hard-coded slash by File.separator
  • Loading branch information
tdonohue authored May 15, 2024
2 parents e30ebc4 + 3e23fea commit 50aaec1
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ public boolean accept(File dir, String name) {
}
}
String vocabulariesPath = DSpaceServicesFactory.getInstance().getConfigurationService()
.getProperty(
"dspace.dir") + "/config/controlled-vocabularies/";
.getProperty("dspace.dir") +
File.separator + "config" +
File.separator + "controlled-vocabularies";
String[] xmlFiles = (new File(vocabulariesPath)).list(new xmlFilter());
List<String> names = new ArrayList<String>();
for (String filename : xmlFiles) {
Expand All @@ -120,7 +121,8 @@ protected void init() {

log.info("Initializing " + this.getClass().getName());
vocabularyName = this.getPluginInstanceName();
String vocabulariesPath = config.getProperty("dspace.dir") + "/config/controlled-vocabularies/";
String vocabulariesPath = config.getProperty("dspace.dir") + File.separator + "config" +
File.separator + "controlled-vocabularies" + File.separator;
String configurationPrefix = "vocabulary.plugin." + vocabularyName;
storeHierarchy = config.getBooleanProperty(configurationPrefix + ".hierarchy.store", storeHierarchy);
suggestHierarchy = config.getBooleanProperty(configurationPrefix + ".hierarchy.suggest", suggestHierarchy);
Expand Down

0 comments on commit 50aaec1

Please sign in to comment.