When setting the variable ssh-deploy-root-local to a string that doesn't end with /, the function ssh-deploy--get-relative-path returns an incorrect path. This is because that function uses replace-regexp-in-string and that regular expression will return the match starting with a /. Then, the function expand-file-name (in line 1148 of ssh-deploy.el) will incorrectly think that it's working with an absolute path and will return the path as given.
This is something that would trigger this problem:
Note that in the last example ssh-deploy-root-local doesn't end with a /. Therefore, with that configuration, when deploying something, the deployed file will be incorrectly tried to be placed in the root directory.
When setting the variable
ssh-deploy-root-local
to a string that doesn't end with/
, the functionssh-deploy--get-relative-path
returns an incorrect path. This is because that function usesreplace-regexp-in-string
and that regular expression will return the match starting with a/
. Then, the functionexpand-file-name
(in line 1148 of ssh-deploy.el) will incorrectly think that it's working with an absolute path and will return the path as given.This is something that would trigger this problem:
Note that in the last example
ssh-deploy-root-local
doesn't end with a/
. Therefore, with that configuration, when deploying something, the deployed file will be incorrectly tried to be placed in the root directory.