Need check for file already exists
Shockks opened this issue ยท 1 comments
get error on server if file already exists, heres the error:
[06Jun2020 16:02:34.458] [modloading-worker-6/ERROR] [de.melanx.defaultworldtype.DefaultWorldType/]: Failed to create defaultworldtype config directory
java.nio.file.FileAlreadyExistsException: /multicraft/servers/server9609/config/defaultworldtype
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:88) ~[?:1.8.0_211]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:1.8.0_211]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:1.8.0_211]
at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384) ~[?:1.8.0_211]
at java.nio.file.Files.createDirectory(Files.java:674) ~[?:1.8.0_211]
at de.melanx.defaultworldtype.DefaultWorldType$ClientConfig.setup(DefaultWorldType.java:110) ~[?:1.0.1]
at de.melanx.defaultworldtype.DefaultWorldType.(DefaultWorldType.java:44) ~[?:1.0.1]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_211]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_211]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_211]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_211]
at java.lang.Class.newInstance(Class.java:442) ~[?:1.8.0_211]
at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:131) ~[?:31.2]
at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65) ~[?:1.8.0_211]
at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65) ~[?:1.8.0_211]
at net.minecraftforge.fml.ModContainer.transitionState(ModContainer.java:112) ~[?:?]
at net.minecraftforge.fml.ModList.lambda$null$10(ModList.java:135) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) [?:1.8.0_211]
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) [?:1.8.0_211]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) [?:1.8.0_211]
at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291) [?:1.8.0_211]
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731) [?:1.8.0_211]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:1.8.0_211]
at java.util.concurrent.ForkJoinPool$WorkQueue.execLocalTasks(ForkJoinPool.java:1040) [?:1.8.0_211]
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1058) [?:1.8.0_211]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:1.8.0_211]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [?:1.8.0_211]