diff options
Diffstat (limited to 'sftp.c')
-rw-r--r-- | sftp.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 | ||
499 | static int | 499 | static 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 | ||
523 | static int | 523 | static int |