Uplink mount better prefix handling (#541)
* Uplink mount better prefix handling * fix formatting
This commit is contained in:
parent
fd99de5834
commit
a62b413de2
@ -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)})
|
||||
|
Loading…
Reference in New Issue
Block a user