File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
common/implementation/base/src/main/java/com/dfsek/terra Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -244,12 +244,13 @@ protected void dumpResources() {
244244 String resourceYaml = IOUtils .toString (resourcesConfig , StandardCharsets .UTF_8 );
245245 Map <String , List <String >> resources = new Yaml ().load (resourceYaml );
246246 resources .forEach ((dir , entries ) -> entries .forEach (entry -> {
247- String resourcePath = dir + File .separatorChar + entry ;
247+ String resourceClassPath = dir + "/" + entry ;
248+ String resourcePath = resourceClassPath .replace ('/' , File .separatorChar );
248249 File resource = new File (getDataFolder (), resourcePath );
249250 if (resource .exists ())
250251 return ; // dont overwrite
251252
252- try (InputStream is = getClass ().getResourceAsStream ("/" + resourcePath )) {
253+ try (InputStream is = getClass ().getResourceAsStream ("/" + resourceClassPath )) {
253254 if (is == null ) {
254255 logger .error ("Resource {} doesn't exist on the classpath!" , resourcePath );
255256 return ;
You can’t perform that action at this time.
0 commit comments