Fix SSH upload bugs
This patch fixes bugs related to SSH upload and improves help messages (how this upload exactly works).
Fixes #22 (closed)
Fixes #23 (closed)
The documentation will be update too of course.
The starting point of the resolved problem is that sshfs can mount both absolute and relative paths. These legit situations may occur (the ssh://
scheme omitted here):
- No path defined (e.g.
192.168.1.2:
or192.168.1.2
). Thesshfs
command accepts only the first one but we should accept the latter one too due to users' comfort. It mounts the login-default directory (usually the user's home directory). - A relative path defined (e.g.
192.168.1.2:tmp
). It mounts the directory relative to the login-default directory. - An absolute path defined (e.g.
192.168.1.2:/tmp
or192.168.1.2/tmp
). Thesshfs
command accepts only the first one but we should accept the latter one too due to users' comfort. It mounts the directory absolute to the remote filesystem's root (may be chrooted/jailed of course).
Before applying this patch it doesn't work correctly as written in the above meant issues. Additionally, users don't get any information about the algorithm described above and after uploading they get a confusing information about paths (URL and path are simply concatenated which has nonsense in the above cases 1 and 2).