Skip to content

Commit

Permalink
style: fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
thetric committed Apr 3, 2017
1 parent e771a9b commit 5ec32af
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import java.nio.file.Path
class CliOptions {
Path syncDir
boolean showCourseSelection
Long fileSizeLimitinMiB
Long fileSizeLimitInMiB
}
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 5ec32af

Please sign in to comment.