mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
EventManager: check the parent directory before creating a zip
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -1848,6 +1848,7 @@ func executeCompressFsActionForUser(c dataprovider.EventActionFsCompress, replac
|
||||
}
|
||||
conn := NewBaseConnection(connectionID, protocolEventAction, "", "", user)
|
||||
name := util.CleanPath(replaceWithReplacer(c.Name, replacer))
|
||||
conn.CheckParentDirs(path.Dir(name)) //nolint:errcheck
|
||||
paths := make([]string, 0, len(c.Paths))
|
||||
for idx := range c.Paths {
|
||||
p := util.CleanPath(replaceWithReplacer(c.Paths[idx], replacer))
|
||||
|
||||
Reference in New Issue
Block a user