summaryrefslogtreecommitdiff
path: root/src/path.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/path.h')
-rw-r--r--src/path.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/path.h b/src/path.h
index 8c912d8..c397a08 100644
--- a/src/path.h
+++ b/src/path.h
@@ -201,11 +201,16 @@ static int mscp_stat(const char *path, mstat *s, sftp_session sftp)
if (sftp) {
s->r = sftp_stat(sftp, path);
- if (!s->r)
+ if (!s->r) {
+ mscp_set_error("sftp_stat: %s %s",
+ sftp_get_ssh_error(sftp), path);
return -1;
+ }
} else {
- if (stat(path, &s->l) < 0)
+ if (stat(path, &s->l) < 0) {
+ mscp_set_error("stat: %s %s", strerrno(), path);
return -1;
+ }
}
return 0;