Skip to content

Commit 9a3ea74

Browse files
committed
Mountpoint does not have to exist on macOS
macFUSE will create the mounpoint (in case it does not exist) before mounting the volume. This allows unprivileged users to mount volumes under /Volumes.
1 parent 0433860 commit 9a3ea74

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

sshfs.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3798,6 +3798,16 @@ static int sshfs_opt_proc(void *data, const char *arg, int key,
37983798
sshfs.mountpoint = strdup(arg);
37993799
} else {
38003800
sshfs.mountpoint = realpath(arg, NULL);
3801+
#ifdef __APPLE__
3802+
if (!sshfs.mountpoint) {
3803+
/*
3804+
* The mountpoint does not exist, yet.
3805+
* macFUSE will try to create it before
3806+
* mounting the volume.
3807+
*/
3808+
sshfs.mountpoint = strdup(arg);
3809+
}
3810+
#endif
38013811
}
38023812
#endif
38033813
if (!sshfs.mountpoint) {

0 commit comments

Comments
 (0)