summaryrefslogtreecommitdiff
path: root/libftpconn
diff options
context:
space:
mode:
Diffstat (limited to 'libftpconn')
-rw-r--r--libftpconn/ChangeLog5
-rw-r--r--libftpconn/unix.c7
2 files changed, 9 insertions, 3 deletions
diff --git a/libftpconn/ChangeLog b/libftpconn/ChangeLog
index 409e6b0a..9f69ea25 100644
--- a/libftpconn/ChangeLog
+++ b/libftpconn/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+ * unix.c (parse_dir_entry): Use st_mtim.tv_sec instead of st_mtime.
+ Set st_atim.tv_nsec, st_ctim.tv_nsec and st_mtim.tv_nsec to 0.
+
2002-10-19 Roland McGrath <roland@frob.com>
* unix.c (ftp_conn_unix_start_get_stats): Pass dirname a copy of NAME
diff --git a/libftpconn/unix.c b/libftpconn/unix.c
index e2a460c7..d279a7a6 100644
--- a/libftpconn/unix.c
+++ b/libftpconn/unix.c
@@ -510,12 +510,13 @@ drwxrwxrwt 7 34 archive 512 May 1 14:28 /tmp
else
tm.tm_year = PARSE_INT () - 1900;
- stat->st_mtime = mktime (&tm);
- if (stat->st_mtime == (time_t)-1)
+ stat->st_mtim.tv_sec = mktime (&tm);
+ if (stat->st_mtim.tv_sec == (time_t)-1)
return EGRATUITOUS;
/* atime and ctime are the same as mtime. */
- stat->st_atime = stat->st_ctime = stat->st_mtime;
+ stat->st_atim.tv_sec = stat->st_ctim.tv_sec = stat->st_mtim.tv_sec;
+ stat->st_atim.tv_nsec = stat->st_ctim.tv_nsec = stat->st_mtim.tv_nsec = 0;
/* Update *LINE to point to the filename. */
SKIP_WS ();