Skip to content

Commit ed08254

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 a9eb71c commit ed08254

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

sshfs.c

+10
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)