mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
SSH system command: add os separator to the resolved path when appropriate
Fixes #327
This commit is contained in:
@@ -470,6 +470,10 @@ func (c *sshCommand) getSystemCommand() (systemCommand, error) {
|
|||||||
// so we need to check the quota for this directory and not its parent dir
|
// so we need to check the quota for this directory and not its parent dir
|
||||||
quotaPath = path.Join(sshPath, "fakecontent")
|
quotaPath = path.Join(sshPath, "fakecontent")
|
||||||
}
|
}
|
||||||
|
if strings.HasSuffix(sshPath, "/") && !strings.HasSuffix(fsPath, string(os.PathSeparator)) {
|
||||||
|
fsPath += string(os.PathSeparator)
|
||||||
|
c.connection.Log(logger.LevelDebug, "path separator added to fsPath %#v", fsPath)
|
||||||
|
}
|
||||||
args = args[:len(args)-1]
|
args = args[:len(args)-1]
|
||||||
args = append(args, fsPath)
|
args = append(args, fsPath)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user