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

Fix unionfs.

parent ed37744c
...@@ -4,6 +4,7 @@ import ( ...@@ -4,6 +4,7 @@ import (
"crypto/md5" "crypto/md5"
"fmt" "fmt"
"github.com/hanwen/go-fuse/fuse" "github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/raw"
"log" "log"
"os" "os"
"path" "path"
...@@ -559,7 +560,7 @@ func (me *UnionFs) Chmod(name string, mode uint32, context *fuse.Context) (code ...@@ -559,7 +560,7 @@ func (me *UnionFs) Chmod(name string, mode uint32, context *fuse.Context) (code
func (me *UnionFs) Access(name string, mode uint32, context *fuse.Context) (code fuse.Status) { func (me *UnionFs) Access(name string, mode uint32, context *fuse.Context) (code fuse.Status) {
// We always allow writing. // We always allow writing.
mode = mode &^ fuse.W_OK mode = mode &^ raw.W_OK
if name == "" { if name == "" {
return fuse.OK return fuse.OK
} }
......
...@@ -2,7 +2,6 @@ package unionfs ...@@ -2,7 +2,6 @@ package unionfs
import ( import (
"fmt" "fmt"
"github.com/hanwen/go-fuse/fuse"
"io/ioutil" "io/ioutil"
"log" "log"
"os" "os"
...@@ -12,6 +11,9 @@ import ( ...@@ -12,6 +11,9 @@ import (
"syscall" "syscall"
"testing" "testing"
"time" "time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/raw"
) )
var _ = fmt.Print var _ = fmt.Print
...@@ -607,7 +609,7 @@ func TestUnionFsWriteAccess(t *testing.T) { ...@@ -607,7 +609,7 @@ func TestUnionFsWriteAccess(t *testing.T) {
CheckSuccess(err) CheckSuccess(err)
freezeRo(wd + "/ro") freezeRo(wd + "/ro")
err = syscall.Access(wd+"/mnt/file", fuse.W_OK) err = syscall.Access(wd+"/mnt/file", raw.W_OK)
if err != nil { if err != nil {
CheckSuccess(err) CheckSuccess(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