Commit c9b89bad authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Use syscall.{Unlink,Remove} rather than os.Remove.

parent e083e29c
......@@ -113,12 +113,13 @@ func (me *LoopbackFileSystem) Mkdir(path string, mode uint32) (code Status) {
return OsErrorToFuseError(os.Mkdir(me.GetPath(path), mode))
}
// Don't use os.Remove, it removes twice (unlink followed by rmdir).
func (me *LoopbackFileSystem) Unlink(name string) (code Status) {
return OsErrorToFuseError(os.Remove(me.GetPath(name)))
return Status(syscall.Unlink(me.GetPath(name)))
}
func (me *LoopbackFileSystem) Rmdir(name string) (code Status) {
return OsErrorToFuseError(os.Remove(me.GetPath(name)))
return Status(syscall.Rmdir(me.GetPath(name)))
}
func (me *LoopbackFileSystem) Symlink(pointedTo string, linkName string) (code Status) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment