diff --git a/duplicacy/duplicacy_main.go b/duplicacy/duplicacy_main.go index cb9e805..b01902f 100644 --- a/duplicacy/duplicacy_main.go +++ b/duplicacy/duplicacy_main.go @@ -223,6 +223,11 @@ func configRepository(context *cli.Context, init bool) { storageName = context.Args()[0] snapshotID = context.Args()[1] storageURL = context.Args()[2] + + if strings.ToLower(storageName) == "ssh" { + duplicacy.LOG_ERROR("PREFERENCE_INVALID", "'%s' is an invalid storage name", storageName) + return + } } var repository string diff --git a/src/duplicacy_preference.go b/src/duplicacy_preference.go index 1ae910f..f9eaeb1 100644 --- a/src/duplicacy_preference.go +++ b/src/duplicacy_preference.go @@ -74,6 +74,13 @@ func LoadPreferences(repository string) bool { return false } + for _, preference := range Preferences { + if strings.ToLower(preference.Name) == "ssh" { + LOG_ERROR("PREFERENCE_INVALID", "'%s' is an invalid storage name", preference.Name) + return false + } + } + return true }