From 53f8a51b124c6f1235beb5c9491b95b894e1c7cf Mon Sep 17 00:00:00 2001 From: Gilbert Chen Date: Wed, 7 Jun 2017 20:51:20 -0400 Subject: [PATCH] Fixed #63: can't use root drive as storage on Windows --- src/duplicacy_storage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/duplicacy_storage.go b/src/duplicacy_storage.go index 1ea632a..d7dc7be 100644 --- a/src/duplicacy_storage.go +++ b/src/duplicacy_storage.go @@ -135,7 +135,7 @@ func CreateStorage(repository string, preference Preference, resetPassword bool, if strings.HasPrefix(storageURL, "/") { isFileStorage = true } else if runtime.GOOS == "windows" { - if len(storageURL) > 3 && storageURL[1] == ':' && (storageURL[2] == '/' || storageURL[2] == '\\') { + if len(storageURL) >= 3 && storageURL[1] == ':' && (storageURL[2] == '/' || storageURL[2] == '\\') { volume := strings.ToLower(storageURL[:1]) if volume[0] >= 'a' && volume[0] <= 'z' { isFileStorage = true