mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-12-26 10:07:32 +00:00
Fix bug where accessed times were wrong!
It used the mtime, rather than the atime. Copy and paste error. Whoops!
This commit is contained in:
parent
ba335bb6e7
commit
5bdf6304bb
2
Vagrantfile
vendored
2
Vagrantfile
vendored
@ -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'.
|
||||
|
4
xtests/dates_accessed
Normal file
4
xtests/dates_accessed
Normal file
@ -0,0 +1,4 @@
|
||||
[4mPermissions[0m [4mSize[0m [4mUser[0m [4mDate Accessed[0m [4mName[0m
|
||||
.[1;33mr[31mw[0m[38;5;244m-[33mr[31mw[38;5;244m-[33mr[38;5;244m--[0m [1;32m0[0m cassowary [34m 3 Mar 2003[0m plum
|
||||
.[1;33mr[31mw[0m[38;5;244m-[33mr[31mw[38;5;244m-[33mr[38;5;244m--[0m [1;32m0[0m cassowary [34m15 Jun 2006[0m pear
|
||||
.[1;33mr[31mw[0m[38;5;244m-[33mr[31mw[38;5;244m-[33mr[38;5;244m--[0m [1;32m0[0m cassowary [34m22 Jul 2009[0m peach
|
4
xtests/dates_modified
Normal file
4
xtests/dates_modified
Normal file
@ -0,0 +1,4 @@
|
||||
[4mPermissions[0m [4mSize[0m [4mUser[0m [4mDate Modified[0m [4mName[0m
|
||||
.[1;33mr[31mw[0m[38;5;244m-[33mr[31mw[38;5;244m-[33mr[38;5;244m--[0m [1;32m0[0m cassowary [34m 3 Mar 2003[0m pear
|
||||
.[1;33mr[31mw[0m[38;5;244m-[33mr[31mw[38;5;244m-[33mr[38;5;244m--[0m [1;32m0[0m cassowary [34m15 Jun 2006[0m peach
|
||||
.[1;33mr[31mw[0m[38;5;244m-[33mr[31mw[38;5;244m-[33mr[38;5;244m--[0m [1;32m0[0m cassowary [34m22 Jul 2009[0m 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.
|
||||
|
Loading…
Reference in New Issue
Block a user