diff --git a/server-setup-config.yaml b/server-setup-config.yaml index 74be7cd..7aa10e6 100644 --- a/server-setup-config.yaml +++ b/server-setup-config.yaml @@ -99,8 +99,10 @@ install: # For often there are config which the user wants to change, here is the place to put the local path to configs, jars or whatever localFiles: - - from: test/All+the+Mods+3-v5.9.5.zip - to: setup/test/All+the+Mods+3-v5.9.5.zip + - from: setup/modpack-download.zip + to: setup/test/modpack-download-copied.zip + - from: out + to: setup/out # This makes the program check the folder for whether it is supposed to use the checkFolder: yes diff --git a/src/main/kotlin/atm/bloodworkxgaming/serverstarter/FileManager.kt b/src/main/kotlin/atm/bloodworkxgaming/serverstarter/FileManager.kt index ef7bd4a..70d0ac4 100644 --- a/src/main/kotlin/atm/bloodworkxgaming/serverstarter/FileManager.kt +++ b/src/main/kotlin/atm/bloodworkxgaming/serverstarter/FileManager.kt @@ -42,7 +42,11 @@ class FileManager(private val configFile: ConfigFile) { for (localFile in configFile.install.localFiles) { LOGGER.info("Copying local file: $localFile") try { - FileUtils.copyFile(File(localFile.from), File(localFile.to)) + if (File(localFile.from).isDirectory) { + FileUtils.copyDirectory(File(localFile.from), File(localFile.to)) + } else { + FileUtils.copyFile(File(localFile.from), File(localFile.to)) + } } catch (e: IOException) { LOGGER.error("Error while copying local file", e) }