1
0
mirror of https://github.com/rclone/rclone.git synced 2025-01-13 20:38:12 +02:00

mountlib: Rename Remove to RemoveName

This commit is contained in:
Nick Craig-Wood 2017-10-26 15:37:45 +01:00
parent 3ec15ac2bd
commit 0bb84efe75
3 changed files with 7 additions and 7 deletions

View File

@ -489,7 +489,7 @@ func (fsys *FS) Unlink(filePath string) (errc int) {
if errc != 0 { if errc != 0 {
return errc return errc
} }
return translateError(parentDir.Remove(leaf)) return translateError(parentDir.RemoveName(leaf))
} }
// Mkdir creates a directory. // Mkdir creates a directory.
@ -510,7 +510,7 @@ func (fsys *FS) Rmdir(dirPath string) (errc int) {
if errc != 0 { if errc != 0 {
return errc return errc
} }
return translateError(parentDir.Remove(leaf)) return translateError(parentDir.RemoveName(leaf))
} }
// Rename renames a file. // Rename renames a file.

View File

@ -164,7 +164,7 @@ var _ fusefs.NodeRemover = (*Dir)(nil)
// may correspond to a file (unlink) or to a directory (rmdir). // may correspond to a file (unlink) or to a directory (rmdir).
func (d *Dir) Remove(ctx context.Context, req *fuse.RemoveRequest) (err error) { func (d *Dir) Remove(ctx context.Context, req *fuse.RemoveRequest) (err error) {
defer fs.Trace(d, "name=%q", req.Name)("err=%v", &err) defer fs.Trace(d, "name=%q", req.Name)("err=%v", &err)
err = d.Dir.Remove(req.Name) err = d.Dir.RemoveName(req.Name)
if err != nil { if err != nil {
return translateError(err) return translateError(err)
} }

View File

@ -356,10 +356,10 @@ func (d *Dir) Mkdir(name string) (*Dir, error) {
return dir, nil return dir, nil
} }
// Remove removes the entry with the given name from // RemoveName removes the entry with the given name from the receiver,
// the receiver, which must be a directory. The entry to be removed // which must be a directory. The entry to be removed may correspond
// may correspond to a file (unlink) or to a directory (rmdir). // to a file (unlink) or to a directory (rmdir).
func (d *Dir) Remove(name string) error { func (d *Dir) RemoveName(name string) error {
if d.fsys.readOnly { if d.fsys.readOnly {
return EROFS return EROFS
} }