fdupes
fdupes copied to clipboard
Use nanosecond-precision timestamps to compare atimes and mtimes
Add int is_first_timespec_newer(struct timespec first, struct timespec second).
Change time_t sorttime to struct timespec sorttimespec.
Change getmtime(char *filename) and getctime(char *filename) to return pointer to newly allocated struct timespec (must be passed to free() after use).
This breaks cross-platform compatibility; on macOS, there is no struct timespec st_mtim
; it's called struct timespec st_mtimespec
instead. fdupes
isn't ported to Windows but if it ever was, on MinGW compilters, there is no struct timespec
in sys/stat.h
. On NetBSD there is a fall-through that defines the nanosecond field as long st_mtimensec
instead of using struct timespec st_mtim
.
Should be fixed by https://github.com/adrianlopezroche/fdupes/commit/8b223d6a2037b6c28d4c00b60dbc9d359309c07f