From 5ec32afee135f22f6e5ca5d338a719fe0fc89a77 Mon Sep 17 00:00:00 2001 From: thetric Date: Mon, 3 Apr 2017 13:53:39 +0200 Subject: [PATCH] style: fix typo --- .../com/github/thetric/iliasdownloader/cli/Cli.groovy | 2 +- .../github/thetric/iliasdownloader/cli/CliOptions.groovy | 2 +- .../thetric/iliasdownloader/cli/IliasCliController.groovy | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/cli/src/main/groovy/com/github/thetric/iliasdownloader/cli/Cli.groovy b/ui/cli/src/main/groovy/com/github/thetric/iliasdownloader/cli/Cli.groovy index 78ef9a1..1489d65 100644 --- a/ui/cli/src/main/groovy/com/github/thetric/iliasdownloader/cli/Cli.groovy +++ b/ui/cli/src/main/groovy/com/github/thetric/iliasdownloader/cli/Cli.groovy @@ -70,7 +70,7 @@ final class Cli { CliOptions cliOptions = new CliOptions( syncDir: Paths.get(options.d as String), showCourseSelection: options.c as boolean, - fileSizeLimitinMiB: size, + fileSizeLimitInMiB: size, ) Path settingsPath = cliOptions.syncDir.resolve('.ilias-downloader.json') UserPreferenceService preferenceService = new JsonUserPreferenceService(settingsPath) diff --git a/ui/cli/src/main/groovy/com/github/thetric/iliasdownloader/cli/CliOptions.groovy b/ui/cli/src/main/groovy/com/github/thetric/iliasdownloader/cli/CliOptions.groovy index 51d6d40..38a247f 100644 --- a/ui/cli/src/main/groovy/com/github/thetric/iliasdownloader/cli/CliOptions.groovy +++ b/ui/cli/src/main/groovy/com/github/thetric/iliasdownloader/cli/CliOptions.groovy @@ -8,5 +8,5 @@ import java.nio.file.Path class CliOptions { Path syncDir boolean showCourseSelection - Long fileSizeLimitinMiB + Long fileSizeLimitInMiB } diff --git a/ui/cli/src/main/groovy/com/github/thetric/iliasdownloader/cli/IliasCliController.groovy b/ui/cli/src/main/groovy/com/github/thetric/iliasdownloader/cli/IliasCliController.groovy index da798c4..7a28038 100644 --- a/ui/cli/src/main/groovy/com/github/thetric/iliasdownloader/cli/IliasCliController.groovy +++ b/ui/cli/src/main/groovy/com/github/thetric/iliasdownloader/cli/IliasCliController.groovy @@ -64,13 +64,13 @@ final class IliasCliController { } private void updateFileSizeLimitFromCliOpts(UserPreferences prefs) { - if (cliOptions.fileSizeLimitinMiB != null) { + if (cliOptions.fileSizeLimitInMiB != null) { // limit = 0 -> unlimited - if (cliOptions.fileSizeLimitinMiB >= 0) { - prefs.maxFileSizeInMiB = cliOptions.fileSizeLimitinMiB + if (cliOptions.fileSizeLimitInMiB >= 0) { + prefs.maxFileSizeInMiB = cliOptions.fileSizeLimitInMiB preferenceService.saveUserPreferences(prefs) } else { - def errMsg = "${resourceBundle.getString('args.sync.max-size.negative')} $cliOptions.fileSizeLimitinMiB" + def errMsg = "${resourceBundle.getString('args.sync.max-size.negative')} $cliOptions.fileSizeLimitInMiB" throw new IllegalArgumentException(errMsg) } }