Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Levin Zimmermann
go-fuse
Commits
2d9827cf
Commit
2d9827cf
authored
Sep 12, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Graceful exit if GetAttr after mkdir/mknod/etc. fails.
parent
0776cb0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
fuse/pathfs.go
fuse/pathfs.go
+11
-6
No files found.
fuse/pathfs.go
View file @
2d9827cf
...
...
@@ -157,12 +157,17 @@ type pathInode struct {
DefaultFsNode
}
func
(
me
*
pathInode
)
fillNewChildAttr
(
path
string
,
child
*
pathInode
,
c
*
Context
)
(
fi
*
os
.
FileInfo
)
{
func
(
me
*
pathInode
)
fillNewChildAttr
(
path
string
,
child
*
pathInode
,
c
*
Context
)
(
fi
*
os
.
FileInfo
,
code
Status
)
{
fi
,
_
=
me
.
fs
.
GetAttr
(
path
,
c
)
if
fi
!=
nil
&&
fi
.
Ino
>
0
{
child
.
clientInode
=
fi
.
Ino
}
return
fi
if
fi
==
nil
{
log
.
Println
(
"fillNewChildAttr found nil FileInfo"
,
path
)
return
nil
,
ENOENT
}
return
fi
,
OK
}
// GetPath returns the path relative to the mount governing this
...
...
@@ -320,7 +325,7 @@ func (me *pathInode) Mknod(name string, mode uint32, dev uint32, context *Contex
if
code
.
Ok
()
{
pNode
:=
me
.
createChild
(
name
)
newNode
=
pNode
fi
=
me
.
fillNewChildAttr
(
fullPath
,
pNode
,
context
)
fi
,
code
=
me
.
fillNewChildAttr
(
fullPath
,
pNode
,
context
)
}
return
}
...
...
@@ -331,7 +336,7 @@ func (me *pathInode) Mkdir(name string, mode uint32, context *Context) (fi *os.F
if
code
.
Ok
()
{
pNode
:=
me
.
createChild
(
name
)
newNode
=
pNode
fi
=
me
.
fillNewChildAttr
(
fullPath
,
pNode
,
context
)
fi
,
code
=
me
.
fillNewChildAttr
(
fullPath
,
pNode
,
context
)
}
return
}
...
...
@@ -350,7 +355,7 @@ func (me *pathInode) Symlink(name string, content string, context *Context) (fi
if
code
.
Ok
()
{
pNode
:=
me
.
createChild
(
name
)
newNode
=
pNode
fi
=
me
.
fillNewChildAttr
(
fullPath
,
pNode
,
context
)
fi
,
code
=
me
.
fillNewChildAttr
(
fullPath
,
pNode
,
context
)
}
return
}
...
...
@@ -385,7 +390,7 @@ func (me *pathInode) Create(name string, flags uint32, mode uint32, context *Con
if
code
.
Ok
()
{
pNode
:=
me
.
createChild
(
name
)
newNode
=
pNode
fi
=
me
.
fillNewChildAttr
(
fullPath
,
pNode
,
context
)
fi
,
code
=
me
.
fillNewChildAttr
(
fullPath
,
pNode
,
context
)
}
return
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment