Fixing deletion behavior

This commit is contained in:
Alex Yatskov 2015-06-17 22:16:41 +09:00
parent 7bcb0cfc6a
commit 9deeb378d4

4
dir.go
View File

@ -78,7 +78,7 @@ func (vd *versionedDir) createDir(name string) (*versionedDir, error) {
return nil, err return nil, err
} }
node := newVersionedNode(childPath, vd.node.ver, nil, NodeFlagDir) node := newVersionedNode(childPath, vd.node.ver, nil, NodeFlagDir|NodeFlagVer)
dir := newVersionedDir(node, vd) dir := newVersionedDir(node, vd)
vd.dirs[name] = dir vd.dirs[name] = dir
@ -97,7 +97,7 @@ func (vd *versionedDir) createFile(name string, flags int) (*versionedFile, erro
return nil, err return nil, err
} }
node := newVersionedNode(childPath, vd.node.ver, nil, 0) node := newVersionedNode(childPath, vd.node.ver, nil, NodeFlagVer)
file := newVersionedFile(node, vd) file := newVersionedFile(node, vd)
file.handle = handle file.handle = handle
vd.files[name] = file vd.files[name] = file