diff options
| author | Jakob Kaivo <jkk@ung.org> | 2022-04-11 18:41:05 -0400 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2022-04-11 18:41:05 -0400 |
| commit | debc4714456ef403650e549b42642b9ade1fdfed (patch) | |
| tree | 20587532151d56c65d918a1da0d219e8bb75830f | |
| parent | 923690add35ef0c62cc169afbb651a6957eb75c2 (diff) | |
fix time sorting order
| -rw-r--r-- | ls.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -116,15 +116,15 @@ static int ls_compare_files(const void *op_a, const void *op_b) break; case CTIME: - ret = a->st.st_ctime - b->st.st_ctime; + ret = b->st.st_ctime - a->st.st_ctime; break; case MTIME: - ret = a->st.st_mtime - b->st.st_mtime; + ret = b->st.st_mtime - a->st.st_mtime; break; case ATIME: - ret = a->st.st_atime - b->st.st_atime; + ret = b->st.st_atime - a->st.st_atime; break; case DIRECTORY: |
