diff options
Diffstat (limited to 'sftp-server.c')
-rw-r--r-- | sftp-server.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sftp-server.c b/sftp-server.c index 5f1b37b01..2ef9753bf 100644 --- a/sftp-server.c +++ b/sftp-server.c | |||
@@ -22,7 +22,7 @@ | |||
22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 | */ | 23 | */ |
24 | #include "includes.h" | 24 | #include "includes.h" |
25 | RCSID("$OpenBSD: sftp-server.c,v 1.29 2001/06/25 08:25:40 markus Exp $"); | 25 | RCSID("$OpenBSD: sftp-server.c,v 1.30 2001/07/31 12:42:50 jakob Exp $"); |
26 | 26 | ||
27 | #include "buffer.h" | 27 | #include "buffer.h" |
28 | #include "bufaux.h" | 28 | #include "bufaux.h" |
@@ -756,8 +756,8 @@ process_readdir(void) | |||
756 | stats = xrealloc(stats, nstats * sizeof(Stat)); | 756 | stats = xrealloc(stats, nstats * sizeof(Stat)); |
757 | } | 757 | } |
758 | /* XXX OVERFLOW ? */ | 758 | /* XXX OVERFLOW ? */ |
759 | snprintf(pathname, sizeof pathname, | 759 | snprintf(pathname, sizeof pathname, "%s%s%s", path, |
760 | "%s/%s", path, dp->d_name); | 760 | strcmp(path, "/") ? "/" : "", dp->d_name); |
761 | if (lstat(pathname, &st) < 0) | 761 | if (lstat(pathname, &st) < 0) |
762 | continue; | 762 | continue; |
763 | stat_to_attrib(&st, &(stats[count].attrib)); | 763 | stat_to_attrib(&st, &(stats[count].attrib)); |