Return EEXIST from create. This appears to work, on OS X at least.

geesefs-0-30-9
Aaron Jacobs 2015-05-21 15:14:16 +10:00
parent 0407fb7690
commit 150440d500
2 changed files with 2 additions and 1 deletions

View File

@ -23,6 +23,7 @@ import (
const (
// Errors corresponding to kernel error numbers. These may be treated
// specially by fuseops.Op.Respond methods.
EEXIST = bazilfuse.EEXIST
EINVAL = bazilfuse.Errno(syscall.EINVAL)
EIO = bazilfuse.EIO
ENOENT = bazilfuse.ENOENT

View File

@ -345,7 +345,7 @@ func (fs *memFS) CreateFile(
// duplicate.
_, exists := parent.LookUpChild(op.Name)
if exists {
err = fmt.Errorf("Name %q already exists in parent", op.Name)
err = fuse.EEXIST
return
}