Uplink mount better prefix handling (#541)

* Uplink mount better prefix handling

* fix formatting
This commit is contained in:
Michal Niewrzal 2018-10-31 21:38:32 +01:00 committed by GitHub
parent fd99de5834
commit a62b413de2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,7 @@ import (
"io"
"os"
"os/signal"
"path/filepath"
"strings"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
@ -165,7 +165,7 @@ func (sf *storjFs) listFiles(ctx context.Context, name string, store objects.Sto
mode := fuse.S_IFREG
if object.IsPrefix {
path = filepath.Clean(path)
path = strings.TrimSuffix(path, "/")
mode = fuse.S_IFDIR
}
entries = append(entries, fuse.DirEntry{Name: path, Mode: uint32(mode)})