From 5b913884cf1d3b6442604abab38e9d7c2b8be0fe Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Fri, 9 Sep 2016 08:38:18 +0100 Subject: [PATCH] crypt: fix Name and Root --- crypt/crypt.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/crypt/crypt.go b/crypt/crypt.go index d457a91f3..69dfbb52a 100644 --- a/crypt/crypt.go +++ b/crypt/crypt.go @@ -86,6 +86,8 @@ func NewFs(name, rpath string) (fs.Fs, error) { Fs: wrappedFs, cipher: cipher, mode: mode, + name: name, + root: rpath, } return f, err } @@ -95,6 +97,18 @@ type Fs struct { fs.Fs cipher Cipher mode NameEncryptionMode + name string + root string +} + +// Name of the remote (as passed into NewFs) +func (f *Fs) Name() string { + return f.name +} + +// Root of the remote (as passed into NewFs) +func (f *Fs) Root() string { + return f.root } // String returns a description of the FS