-
Notifications
You must be signed in to change notification settings - Fork 392
Open
Description
In the documentation there is a section about Static in-memory file systems.
The file system this creates is not technically read-only, as files and directories can be removed without any error.
There is even todo in the code:
Lines 395 to 408 in f1d40d0
| func (b *rawBridge) Rmdir(cancel <-chan struct{}, header *fuse.InHeader, name string) fuse.Status { | |
| parent, _ := b.inode(header.NodeId, 0) | |
| var errno syscall.Errno | |
| if mops, ok := parent.ops.(NodeRmdirer); ok { | |
| errno = mops.Rmdir(&fuse.Context{Caller: header.Caller, Cancel: cancel}, name) | |
| } | |
| // TODO - this should not succeed silently. | |
| if errno == 0 { | |
| parent.RmChild(name) | |
| } | |
| return errnoToStatus(errno) | |
| } |
Lines 410 to 423 in f1d40d0
| func (b *rawBridge) Unlink(cancel <-chan struct{}, header *fuse.InHeader, name string) fuse.Status { | |
| parent, _ := b.inode(header.NodeId, 0) | |
| var errno syscall.Errno | |
| if mops, ok := parent.ops.(NodeUnlinker); ok { | |
| errno = mops.Unlink(&fuse.Context{Caller: header.Caller, Cancel: cancel}, name) | |
| } | |
| // TODO - this should not succeed silently. | |
| if errno == 0 { | |
| parent.RmChild(name) | |
| } | |
| return errnoToStatus(errno) | |
| } |
The docs for these methods also indicate success by default
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels