find: -printf %A@ and %T@ reject timestamps before 1970
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 30/100
Línea de trabajo
The issue points to src/find/matchers/printf.rs, where TimeFormat::SinceEpoch calls duration_since(UNIX_EPOCH)?. Read that implementation and inspect nearby tests for %A@ and %T@; reproduce with the issue’s pre-1970 example. Done means -printf and -fprintf print negative epoch seconds, including fractional timestamps, without the error.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
%A@ and %T@ should print negative epoch seconds for files whose access or modification time is before 1970. Current main instead reports an error and stops rendering the format for that file, while still exiting 0.
From the repository root after building:
uu_find="$PWD/target/debug/find"
tmp=$(mktemp -d)
(
cd "$tmp" || exit
touch -a -m -d '1969-12-31 23:59:59 UTC' file
LC_ALL=C /usr/bin/find file -printf '%A@|%T@\n'
LC_ALL=C "$uu_find" file -printf '%A@|%T@\n'
)
GNU findutils 4.11.0 prints:
-1.0000000000|-1.0000000000
uutils prints no stdout and reports:
Error processing 'file': second time provided was later than self
Both exit 0. The same problem occurs with -fprintf, and fractional timestamps before the epoch also fail. Timestamps at or after the epoch work.
TimeFormat::SinceEpoch uses duration_since(UNIX_EPOCH)?, which rejects negative offsets. This is separate from #914, which fixes pre-1970 comparisons for -newerXt.
Tested with uutils findutils 0.11.0, main 82cfc21f0d45fc654588f0f4243e9c6e5f57fc97, on Debian forky/sid, Linux x86_64, against /usr/bin/find from GNU findutils 4.11.0.
- Lenguaje dominante
- Rust
- Estrellas
- 657
- Forks
- 115
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 31
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de uutils/findutils
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
uutils/findutils#692 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
find on Windows: opt in to / as the path separatorPosiblemente ocupada @mutewinter la tomó hace 24 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 15/100
Los mantenedores suelen responder en 1 día
-
xargs: -x runs a pending command before rejecting an oversized argumentPosiblemente ocupada @SichenLiang la tomó hace 26 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 28/100
Los mantenedores suelen responder en 1 día
Todos los issues de uutils/findutils
Issues similares
-
needs-triage tooling
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
neilsh/stunt-reel#317 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
storytold/craft-fonts#65 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
storytold/craft-libs#723 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
n0-computer/iroh#4669 · 1 comentario ·
Los mantenedores suelen responder en 1 día