From 3447136e2adfae6ca107820f8afce5580bc06183 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 1 Jun 2012 16:02:07 -0700 Subject: [PATCH] io.files.info.unix: When setting access or modified time alone, don't set the other time to 1970. See #490. --- basis/io/files/info/unix/unix.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basis/io/files/info/unix/unix.factor b/basis/io/files/info/unix/unix.factor index 6287ee9d43..a3c82af4cf 100644 --- a/basis/io/files/info/unix/unix.factor +++ b/basis/io/files/info/unix/unix.factor @@ -202,10 +202,10 @@ PRIVATE> timestamps>byte-array [ utimes ] unix-system-call drop ; : set-file-access-time ( path timestamp -- ) - f 2array set-file-times ; + over file-info modified>> 2array set-file-times ; : set-file-modified-time ( path timestamp -- ) - f swap 2array set-file-times ; + over file-info accessed>> swap 2array set-file-times ; : set-file-ids ( path uid gid -- ) [ normalize-path ] 2dip [ -1 or ] bi@