From ce6753c88f1d06e537d8f04bc5caf4a87749386c Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Mon, 14 May 2012 16:18:22 +0200 Subject: When checking root directory use LSTAT not STAT This prevents I/O error being returned after a successful mount if a symlink is mounted. Reported by Bart Friederichs --- sshfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sshfs.c') diff --git a/sshfs.c b/sshfs.c index 7cfa341..4945302 100644 --- a/sshfs.c +++ b/sshfs.c @@ -1620,7 +1620,7 @@ static int sftp_check_root(const char *base_path) buf_init(&buf, 0); buf_add_string(&buf, remote_dir); buf_to_iov(&buf, &iov[0]); - if (sftp_send_iov(SSH_FXP_STAT, id, iov, 1) == -1) + if (sftp_send_iov(SSH_FXP_LSTAT, id, iov, 1) == -1) goto out; buf_clear(&buf); if (sftp_read(&type, &buf) == -1) -- cgit v1.2.3