Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong upload path if remote path doesn't end with "/" #77

Open
UndeadKernel opened this issue Jul 22, 2024 · 1 comment
Open

Wrong upload path if remote path doesn't end with "/" #77

UndeadKernel opened this issue Jul 22, 2024 · 1 comment

Comments

@UndeadKernel
Copy link

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:

         (ssh-deploy-root-remote . "/ssh:remote-host:folder/")
         (ssh-deploy-root-local . "/home/user/folder")

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.

@cjohansson
Copy link
Owner

Sounds plausible, thanks for reporting the issue and sorry for the late response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants