Compare commits

..

3 Commits

Author SHA1 Message Date
comp500
60887a4312 Whoops 2020-12-07 17:42:52 +00:00
comp500
a368268038 Fix support for symlinked directories 2020-12-07 17:38:21 +00:00
comp500
8beded7b41 Improve UX when there are no optional mods 2020-12-06 19:05:56 +00:00
2 changed files with 15 additions and 5 deletions

View File

@@ -176,7 +176,10 @@ internal class DownloadTask private constructor(val metadata: IndexFile.File, de
}
if (fileSource.hashIsEqual(hash)) {
Files.createDirectories(destPath.parent)
// isDirectory follows symlinks, but createDirectories doesn't
if (!Files.isDirectory(destPath.parent)) {
Files.createDirectories(destPath.parent)
}
Files.copy(data.inputStream(), destPath, StandardCopyOption.REPLACE_EXISTING)
data.clear()
} else {

View File

@@ -180,9 +180,16 @@ class InstallWindow : IUserInterface {
override fun showOptions(options: List<IOptionDetails>): Future<Boolean> {
val future = CompletableFuture<Boolean>()
EventQueue.invokeLater {
OptionsSelectWindow(options, future, frmPackwizlauncher).apply {
defaultCloseOperation = JDialog.DISPOSE_ON_CLOSE
isVisible = true
if (options.isEmpty()) {
JOptionPane.showMessageDialog(null,
"This modpack has no optional mods!",
"Optional mods", JOptionPane.INFORMATION_MESSAGE)
future.complete(false)
} else {
OptionsSelectWindow(options, future, frmPackwizlauncher).apply {
defaultCloseOperation = JDialog.DISPOSE_ON_CLOSE
isVisible = true
}
}
}
return future
@@ -201,7 +208,7 @@ class InstallWindow : IUserInterface {
override fun disableOptionsButton() {
btnOptions.apply {
text = "Optional mods..."
text = "No optional mods"
isEnabled = false
}
}