2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-26 14:56:29 +00:00

fuse: use node.Type instead of node.Mode

This commit is contained in:
Alexander Neumann 2015-07-21 21:23:40 +02:00
parent aeb5a694d3
commit 99dae57b4f

View File

@ -66,10 +66,10 @@ func (d *dir) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error) {
for _, node := range d.children {
var typ fuse.DirentType
switch {
case node.Mode.IsDir():
switch node.Type {
case "dir":
typ = fuse.DT_Dir
case node.Mode.IsRegular():
case "file":
typ = fuse.DT_File
}
@ -88,10 +88,10 @@ func (d *dir) Lookup(ctx context.Context, name string) (fs.Node, error) {
if !ok {
return nil, fuse.ENOENT
}
switch {
case child.Mode.IsDir():
switch child.Type {
case "dir":
return newDir(d.repo, child)
case child.Mode.IsRegular():
case "file":
return newFile(d.repo, child)
default:
return nil, fuse.ENOENT