1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-06 00:03:38 +00:00

Fixed #63: can't use root drive as storage on Windows

This commit is contained in:
Gilbert Chen
2017-06-07 20:51:20 -04:00
parent 1e8442311d
commit 53f8a51b12

View File

@@ -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