mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 06:09:39 +08:00
Merge pull request #850 from Zexi/hotfix/sshpart-path-exists
fix: SSHPartition test symbolic file exists fail
This commit is contained in:
@@ -106,7 +106,8 @@ func (p *SSHPartition) osRmDir(path string) error {
|
||||
}
|
||||
|
||||
func (p *SSHPartition) osPathExists(path string) bool {
|
||||
_, err := p.term.Run(fmt.Sprintf("test -e %s", path))
|
||||
// test file or symbolic link exists
|
||||
_, err := p.term.Run(fmt.Sprintf("test -e %s || test -L %s", path, path))
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user