diff --git a/backend/crypt/crypt.go b/backend/crypt/crypt.go index 56d9cabf5..eabb2623e 100644 --- a/backend/crypt/crypt.go +++ b/backend/crypt/crypt.go @@ -5,6 +5,7 @@ import ( "context" "fmt" "io" + "path" "strings" "time" @@ -144,6 +145,10 @@ func NewFs(name, rpath string, m configmap.Mapper) (fs.Fs, error) { if err != nil { return nil, errors.Wrapf(err, "failed to parse remote %q to wrap", remote) } + // Make sure to remove trailing . reffering to the current dir + if path.Base(rpath) == "." { + rpath = strings.TrimSuffix(rpath, ".") + } // Look for a file first remotePath := fspath.JoinRootPath(wPath, cipher.EncryptFileName(rpath)) wrappedFs, err := wInfo.NewFs(wName, remotePath, wConfig)