Skip to content

Fix SSH upload bugs

Lukas Jelinek requested to merge sshfs into master

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):

  1. No path defined (e.g. 192.168.1.2: or 192.168.1.2). The sshfs 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).
  2. A relative path defined (e.g. 192.168.1.2:tmp). It mounts the directory relative to the login-default directory.
  3. An absolute path defined (e.g. 192.168.1.2:/tmp or 192.168.1.2/tmp). The sshfs 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).

Edited by Lukas Jelinek

Merge request reports