Thumbnail generation is skipped for files with future modification timestamps
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 85/100
Línea de trabajo
Empieza en libnemo-private/nemo-thumbnails.c, en la comprobación de RECENT_MTIME_COOLDOWN contra info->original_file_mtime. Reproduce con un JPEG cuyo mtime esté 24 horas en el futuro, luego ajusta la condición para que el cooldown se aplique solo cuando el mtime no esté en el futuro. Hecho significa que los archivos con mtime futuro obtienen thumbnails mientras que los archivos modificados recientemente siguen respetando el cooldown existente; recompila Nemo y repite la prueba descrita.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Distribution
Linux Mint 22.3 Zena
Package version
6.6.3+zena
Frequency
Always
Bug description
Problem description
Nemo may indefinitely skip thumbnail generation for files whose modification timestamp (mtime) is in the future.
The current code applies the recent-modification cooldown using the following condition:
if (current_time < info->original_file_mtime + RECENT_MTIME_COOLDOWN) {
If a file's mtime is later than the current system time, this condition remains true until the current time reaches the file's modification timestamp plus RECENT_MTIME_COOLDOWN. As a result, Nemo does not attempt to generate a thumbnail during that period.
This can occur, for example, when files are copied from a device or filesystem that uses a different clock or timestamp convention.
Expected behavior
Files with future modification timestamps should not be blocked by the recent-modification cooldown. Nemo should proceed with thumbnail generation.
The cooldown should continue to apply to files modified within the existing cooldown period.
Proposed fix
Check that the file's modification timestamp is not in the future before applying the cooldown:
if (info->original_file_mtime <= current_time &&
current_time < info->original_file_mtime + RECENT_MTIME_COOLDOWN) {
This preserves the existing cooldown behavior for recently modified files while allowing thumbnail generation for files with future timestamps.
Steps to reproduce
- Create or select a JPEG image.
- Set its modification timestamp approximately 24 hours into the future.
- Open the containing directory in Nemo.
- Observe that the thumbnail is not generated or displayed.
- Apply the proposed change, rebuild Nemo, and repeat the test.
Test results
Tested on Linux Mint 22.3 Zena with Nemo 6.6.3+zena.
- Created a JPEG test image and set its
mtimeapproximately 24 hours into the future. - Confirmed that the original version of Nemo did not display the thumbnail.
- Rebuilt and installed Nemo with the proposed change.
- Confirmed that the patched version successfully generated and displayed the thumbnail.
- Removed an outdated
xx-largethumbnail cache entry and confirmed that Nemo regenerated a valid thumbnail. - Verified that the patch applies cleanly in both forward and reverse directions.
Proposed patch
The attached patch modifies libnemo-private/nemo-thumbnails.c.
nemo-future-mtime-thumbnail-fix.patch
Steps to reproduce
- Create or select a JPEG image.
- Set its modification timestamp approximately 24 hours into the future.
- Open the containing directory in Nemo.
- Observe that the thumbnail is not generated or displayed.
- Apply the proposed change, rebuild Nemo, and repeat the test.
Expected behavior
Files with modification timestamps in the future should still have their thumbnails generated normally.
The recent-modification cooldown should only apply when the file's modification timestamp is not later than the current system time.
The existing cooldown behavior for recently modified files should remain unchanged.
Additional information
The issue was reproduced on Linux Mint 22.3 Zena with Nemo 6.6.3+zena.
The proposed fix has been built and tested locally. Thumbnail generation works as expected for a JPEG file with an mtime approximately 24 hours in the future after applying the patch.
The patch has been verified by applying it in both forward and reverse directions.
The fix has not yet been tested against the latest upstream development branch.
- Lenguaje dominante
- C
- Estrellas
- 1.6k
- Forks
- 391
- Merge medio
- 2 d 19 h
- PR fusionados (30 d)
- 4
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 linuxmint/nemo
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Copy dialog: Enter key accidentally cancels file copyPosiblemente ocupada @jackjusko la tomó hace 9 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
linuxmint/nemo#3838 · 1 comentario · 2 reacciones ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
linuxmint/nemo#3805 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de linuxmint/nemo
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Claude:NeedsReview GPT:ConfirmedBug GPT:NeedsReview triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
open5gs/open5gs#5114 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
owntone/owntone-server#2071 ·
-
bgpd: 'address-family link-state' under a VRF instance silently produces unusable configurationAbiertotriage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
FRRouting/frr#24557 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día