mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 22:30:56 +03:00
sftp actions: add a parameter to distinguish local and remote files
This commit is contained in:
@@ -314,7 +314,7 @@ func (c Connection) handleSFTPRename(sourcePath string, targetPath string, reque
|
||||
return vfs.GetSFTPError(c.fs, err)
|
||||
}
|
||||
logger.CommandLog(renameLogSender, sourcePath, targetPath, c.User.Username, "", c.ID, c.protocol, -1, -1, "", "", "")
|
||||
go executeAction(operationRename, c.User.Username, sourcePath, targetPath, "", 0)
|
||||
go executeAction(operationRename, c.User.Username, sourcePath, targetPath, "", 0, vfs.IsLocalOsFs(c.fs))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -404,7 +404,7 @@ func (c Connection) handleSFTPRemove(filePath string, request *sftp.Request) err
|
||||
if fi.Mode()&os.ModeSymlink != os.ModeSymlink {
|
||||
dataprovider.UpdateUserQuota(dataProvider, c.User, -1, -size, false)
|
||||
}
|
||||
go executeAction(operationDelete, c.User.Username, filePath, "", "", fi.Size())
|
||||
go executeAction(operationDelete, c.User.Username, filePath, "", "", fi.Size(), vfs.IsLocalOsFs(c.fs))
|
||||
|
||||
return sftp.ErrSSHFxOk
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user