summaryrefslogtreecommitdiff
path: root/sftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sftp.c')
-rw-r--r--sftp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sftp.c b/sftp.c
index cf3dea048..c018615ae 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp.c,v 1.91 2006/08/03 03:34:42 deraadt Exp $ */ 1/* $OpenBSD: sftp.c,v 1.92 2006/09/19 05:52:23 otto Exp $ */
2/* 2/*
3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -493,7 +493,7 @@ is_dir(char *path)
493 if (stat(path, &sb) == -1) 493 if (stat(path, &sb) == -1)
494 return(0); 494 return(0);
495 495
496 return(sb.st_mode & S_IFDIR); 496 return(S_ISDIR(sb.st_mode));
497} 497}
498 498
499static int 499static int
@@ -517,7 +517,7 @@ remote_is_dir(struct sftp_conn *conn, char *path)
517 return(0); 517 return(0);
518 if (!(a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS)) 518 if (!(a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS))
519 return(0); 519 return(0);
520 return(a->perm & S_IFDIR); 520 return(S_ISDIR(a->perm));
521} 521}
522 522
523static int 523static int