mirror of
https://github.com/octoleo/restic.git
synced 2024-11-30 00:33:57 +00:00
fuse: use node.Type instead of node.Mode
This commit is contained in:
parent
aeb5a694d3
commit
99dae57b4f
@ -66,10 +66,10 @@ func (d *dir) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error) {
|
|||||||
|
|
||||||
for _, node := range d.children {
|
for _, node := range d.children {
|
||||||
var typ fuse.DirentType
|
var typ fuse.DirentType
|
||||||
switch {
|
switch node.Type {
|
||||||
case node.Mode.IsDir():
|
case "dir":
|
||||||
typ = fuse.DT_Dir
|
typ = fuse.DT_Dir
|
||||||
case node.Mode.IsRegular():
|
case "file":
|
||||||
typ = fuse.DT_File
|
typ = fuse.DT_File
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,10 +88,10 @@ func (d *dir) Lookup(ctx context.Context, name string) (fs.Node, error) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
return nil, fuse.ENOENT
|
return nil, fuse.ENOENT
|
||||||
}
|
}
|
||||||
switch {
|
switch child.Type {
|
||||||
case child.Mode.IsDir():
|
case "dir":
|
||||||
return newDir(d.repo, child)
|
return newDir(d.repo, child)
|
||||||
case child.Mode.IsRegular():
|
case "file":
|
||||||
return newFile(d.repo, child)
|
return newFile(d.repo, child)
|
||||||
default:
|
default:
|
||||||
return nil, fuse.ENOENT
|
return nil, fuse.ENOENT
|
||||||
|
Loading…
Reference in New Issue
Block a user