cjohansson / emacs-ssh-deploy

A deployment plugin via Tramp for Emacs.
GNU General Public License v3.0
154 stars 6 forks source link

Fails to target remote system, tries to "deploy" on / #71

Closed fdgonthier closed 3 years ago

fdgonthier commented 3 years ago

I've configured emacs-ssh-deploy this way:

((nil . ((ssh-deploy-root-local . "/home/neumann/project")
         (ssh-deploy-root-remote . "/ssh:neumann@remote:/home/neumann/project")
         (ssh-deploy-automatically-detect-remote-changes . 0)
         (ssh-deploy-on-explicit-save . 1)
         (ssh-deploy-debug . 1)
         (ssh-deploy-verbose . 1)
         (ssh-deploy-async . 0)
)))

Unfortunately, whenever I save, or try to force the upload, it seems the addon tries to access my root directory instead of the remote system.

I've traced ssh-deploy--get-relative-path and it seems to strip the remote path entirely:

======================================================================
1 -> (ssh-deploy--get-relative-path "/home/neumann/project" "/home/neumann/project/file")
1 <- ssh-deploy--get-relative-path: "/file"

Output tracing expand-file-name may also help, although I'm not sure how to interpret ikt.

1 -> (expand-file-name "/file" "/ssh:neumann@remote:/home/neumann/project")
| 2 -> (expand-file-name "/file" "/ssh:neumann@remote:/home/neumann/project")
| 2 <- expand-file-name: "/file"
1 <- expand-file-name: "/file"

This is as far as I can go for now. Not very familiar with Emacs development.

cjohansson commented 3 years ago

The issue, I think, is the paths should be ending with a front-slash, so replace "/bla/bla" with "/bla/bla/"

fdgonthier commented 3 years ago

... it's working right now... I really thought I had tried this. Really sorry. Shame