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

unionfs: Fix access constants package.

parent 62df4e52
......@@ -473,6 +473,6 @@ func (fs *autoUnionFs) OpenDir(name string, context *fuse.Context) (stream []fus
return stream, status
}
func (fs *autoUnionFs) StatFs(name string) *nodefs.StatfsOut {
return &nodefs.StatfsOut{}
func (fs *autoUnionFs) StatFs(name string) *fuse.StatfsOut {
return &fuse.StatfsOut{}
}
......@@ -15,7 +15,6 @@ import (
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/raw"
)
func filePathHash(path string) string {
......@@ -567,7 +566,7 @@ func (fs *unionFS) Chmod(name string, mode uint32, context *fuse.Context) (code
func (fs *unionFS) Access(name string, mode uint32, context *fuse.Context) (code fuse.Status) {
// We always allow writing.
mode = mode &^ raw.W_OK
mode = mode &^ fuse.W_OK
if name == "" {
return fuse.OK
}
......@@ -970,7 +969,7 @@ func (fs *unionFS) String() string {
return fmt.Sprintf("UnionFs(%v)", names)
}
func (fs *unionFS) StatFs(name string) *nodefs.StatfsOut {
func (fs *unionFS) StatFs(name string) *fuse.StatfsOut {
return fs.fileSystems[0].StatFs("")
}
......
......@@ -18,7 +18,6 @@ import (
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/raw"
)
var _ = fmt.Print
......@@ -731,7 +730,7 @@ func TestUnionFsWriteAccess(t *testing.T) {
}
setRecursiveWritable(t, wd+"/ro", false)
err = syscall.Access(wd+"/mnt/file", raw.W_OK)
err = syscall.Access(wd+"/mnt/file", fuse.W_OK)
if err != nil {
if err != nil {
t.Fatalf("Access failed: %v", err)
......
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