1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-16 08:13:20 +00:00

Add caching to network drives

This commit is contained in:
Gilbert Chen
2017-08-08 23:10:22 -04:00
parent 0bc475ca4d
commit 315dfff7d6
4 changed files with 29 additions and 10 deletions

View File

@@ -41,7 +41,7 @@ func init() {
func loadStorage(localStoragePath string, threads int) (Storage, error) {
if testStorageName == "" || testStorageName == "file" {
return CreateFileStorage(localStoragePath, 2, threads)
return CreateFileStorage(localStoragePath, 2, false, threads)
}
config, err := ioutil.ReadFile("test_storage.conf")
@@ -62,7 +62,9 @@ func loadStorage(localStoragePath string, threads int) (Storage, error) {
}
if testStorageName == "flat" {
return CreateFileStorage(localStoragePath, 0, threads)
return CreateFileStorage(localStoragePath, 0, false, threads)
} else if testStorageName == "samba" {
return CreateFileStorage(localStoragePath, 2, true, threads)
} else if testStorageName == "sftp" {
port, _ := strconv.Atoi(storage["port"])
return CreateSFTPStorageWithPassword(storage["server"], port, storage["username"], storage["directory"], storage["password"], threads)