提交 5bdf6304 编写于 作者: B Benjamin Sago

Fix bug where accessed times were wrong!

It used the mtime, rather than the atime. Copy and paste error. Whoops!
上级 ba335bb6
......@@ -320,6 +320,8 @@ Vagrant.configure(2) do |config|
touch -t #{old} -a "#{test_dir}/dates/plum"
touch -t #{med} -a "#{test_dir}/dates/pear"
touch -t #{new} -a "#{test_dir}/dates/peach"
sudo chown #{user}:#{user} -R "#{test_dir}/dates"
EOF
......
......@@ -282,7 +282,7 @@ impl<'dir> File<'dir> {
}
pub fn accessed_time(&self) -> f::Time {
f::Time(self.metadata.mtime())
f::Time(self.metadata.atime())
}
/// This file's 'type'.
......
Permissions Size User Date Accessed Name
.rw-rw-r-- 0 cassowary  3 Mar 2003 plum
.rw-rw-r-- 0 cassowary 15 Jun 2006 pear
.rw-rw-r-- 0 cassowary 22 Jul 2009 peach
Permissions Size User Date Modified Name
.rw-rw-r-- 0 cassowary  3 Mar 2003 pear
.rw-rw-r-- 0 cassowary 15 Jun 2006 peach
.rw-rw-r-- 0 cassowary 22 Jul 2009 plum
......@@ -107,6 +107,11 @@ $exa $testcases/file-names-exts/music.* -I "*.OGG" -1 2>&1 | diff -q - $re
$exa $testcases/file-names-exts/music.* -I "*.OGG|*.mp3" -1 2>&1 | diff -q - $results/empty || exit 1
# Dates and times
$exa $testcases/dates -lh --accessed --sort=accessed 2>&1 | diff -q - $results/dates_accessed || exit 1
$exa $testcases/dates -lh --sort=modified 2>&1 | diff -q - $results/dates_modified || exit 1
# Paths and directories
# These directories are created in the VM user’s home directory (the default
# location) when a Cargo build is done.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册