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:
parent
3ec15ac2bd
commit
0bb84efe75
@ -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.
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user