mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
conditional support for recursive renaming for cloud providers
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -138,11 +138,12 @@ func (fs MockOsFs) Remove(name string, isDir bool) error {
|
||||
}
|
||||
|
||||
// Rename renames (moves) source to target
|
||||
func (fs MockOsFs) Rename(source, target string) error {
|
||||
func (fs MockOsFs) Rename(source, target string) (int, int64, error) {
|
||||
if fs.err != nil {
|
||||
return fs.err
|
||||
return -1, -1, fs.err
|
||||
}
|
||||
return os.Rename(source, target)
|
||||
err := os.Rename(source, target)
|
||||
return -1, -1, err
|
||||
}
|
||||
|
||||
func newMockOsFs(err, statErr error, atomicUpload bool, connectionID, rootDir string) vfs.Fs {
|
||||
|
||||
Reference in New Issue
Block a user