diff options
author | Benjamin Fleischer <fleiben@gmail.com> | 2017-07-07 23:30:17 +0200 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2017-07-13 16:04:12 +0200 |
commit | 861d308a03319e23286290ee8cffc6fd307e0ec9 (patch) | |
tree | 4ca2dc0d4d2ec3531bf85f85ac142207add469dd /sshfs.c | |
parent | 319f0dde18afb6f4abf9258d6e74e762077b4e86 (diff) | |
download | sshfs-861d308a03319e23286290ee8cffc6fd307e0ec9.tar sshfs-861d308a03319e23286290ee8cffc6fd307e0ec9.tar.gz sshfs-861d308a03319e23286290ee8cffc6fd307e0ec9.tar.bz2 sshfs-861d308a03319e23286290ee8cffc6fd307e0ec9.zip |
Don't require mount point to exists on macOS
By default volumes are mounted under /Volumes on macOS. Since macOS
10.12 the /Volumes directory is root-owned. In order to allow non-
privileged users to mount FUSE volumes under /Volumes FUSE will create
non-existent mount points automatically.
Fixes osxfuse/sshfs#27
Diffstat (limited to 'sshfs.c')
-rw-r--r-- | sshfs.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -3825,7 +3825,7 @@ int main(int argc, char *argv[]) const char *sftp_server; struct fuse *fuse; struct fuse_session *se; -#if !defined(__CYGWIN__) +#if !defined(__APPLE__) && !defined(__CYGWIN__) struct stat st; #endif @@ -3989,15 +3989,14 @@ int main(int argc, char *argv[]) g_free(tmp); g_free(fsname); - -#if !defined(__CYGWIN__) +#if !defined(__APPLE__) && !defined(__CYGWIN__) res = stat(sshfs.mountpoint, &st); if (res == -1) { perror(sshfs.mountpoint); exit(1); } sshfs.mnt_mode = st.st_mode; -#elif defined(__CYGWIN__) +#else sshfs.mnt_mode = S_IFDIR | 0755; #endif |