Error out immediately if the storage can't be found

This commit is contained in:
Gilbert Chen
2017-10-26 21:03:19 -04:00
parent 8ad981b64d
commit 7e1fb6130a

View File

@@ -372,7 +372,8 @@ func configRepository(context *cli.Context, init bool) {
otherPreference := duplicacy.FindPreference(context.String("copy"))
if otherPreference == nil {
duplicacy.LOG_ERROR("STORAGE_NOTFOUND", "Storage '%s' can't be found", context.String("copy"))
return
}
otherStorage := duplicacy.CreateStorage(*otherPreference, false, 1)