aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Salvatore <mike.s.salvatore@gmail.com>2019-04-14 06:52:47 -0400
committerNikolaus Rath <Nikolaus@rath.org>2019-04-14 11:52:47 +0100
commit23f68586955a16ed957fc1d5a284d2fc63e02bf5 (patch)
treeadabbea284691f2cd75622e5f57c86b85fb5897c
parenta819ec4e227a748e3d3a9bb6a4fb6c50b9bbf18b (diff)
downloadsshfs-23f68586955a16ed957fc1d5a284d2fc63e02bf5.tar
sshfs-23f68586955a16ed957fc1d5a284d2fc63e02bf5.tar.gz
sshfs-23f68586955a16ed957fc1d5a284d2fc63e02bf5.tar.bz2
sshfs-23f68586955a16ed957fc1d5a284d2fc63e02bf5.zip
Print a useful error if no mountpoint could be parsed (#170)
Fixes #75
-rw-r--r--sshfs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sshfs.c b/sshfs.c
index f282a91..8cefc5d 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -4051,6 +4051,12 @@ int main(int argc, char *argv[])
if (res == -1)
exit(1);
+ if (!mountpoint) {
+ fprintf(stderr, "ERROR: No mount point could be parsed "
+ "from the command-line options\n");
+ exit(1);
+ }
+
if (sshfs.slave) {
/* Force sshfs to the foreground when using stdin+stdout */
foreground = 1;