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

Put IsRegular() check in promote, so renames within the writable

branch do work.
parent 13e7ad2c
......@@ -244,6 +244,11 @@ func (me *UnionFs) putDeletion(name string) (code fuse.Status) {
// Promotion.
func (me *UnionFs) Promote(name string, srcResult branchResult) fuse.Status {
if !srcResult.attr.IsRegular() {
// TODO - implement rename for dirs, links, etc.
return fuse.ENOSYS
}
writable := me.fileSystems[0]
sourceFs := me.fileSystems[srcResult.branch]
......@@ -665,10 +670,6 @@ func (me *UnionFs) Rename(src string, dst string) (code fuse.Status) {
if code.Ok() {
code = srcResult.code
}
if code.Ok() && !srcResult.attr.IsRegular() {
// TODO - implement rename for dirs, links, etc.
code = fuse.ENOSYS
}
if code.Ok() && srcResult.branch > 0 {
code = me.Promote(src, srcResult)
}
......
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