mirror of
https://github.com/jkl1337/duplicacy.git
synced 2026-01-02 19:54:54 -06:00
Avoid filepath.Dir as it returns paths with back slashes on Windows
This commit is contained in:
@@ -18,7 +18,6 @@ import (
|
||||
"math/rand"
|
||||
"net/http"
|
||||
//"net/http/httputil"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -360,11 +359,12 @@ func (storage *WebDAVStorage) MoveFile(threadIndex int, from string, to string)
|
||||
|
||||
// createParentDirectory creates the parent directory if it doesn't exist in the cache
|
||||
func (storage *WebDAVStorage) createParentDirectory(threadIndex int, dir string) (err error) {
|
||||
parent := filepath.Dir(dir)
|
||||
|
||||
if parent == "." {
|
||||
found := strings.LastIndex(dir, "/")
|
||||
if found == -1 {
|
||||
return nil
|
||||
}
|
||||
parent := dir[:found]
|
||||
|
||||
storage.directoryCacheLock.Lock()
|
||||
_, exist := storage.directoryCache[parent]
|
||||
|
||||
Reference in New Issue
Block a user