Thumbnail generation is skipped for files with future modification timestamps
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 85/100
Hướng nghiên cứu
Bắt đầu trong libnemo-private/nemo-thumbnails.c tại chỗ kiểm tra RECENT_MTIME_COOLDOWN so với info->original_file_mtime. Tái hiện bằng một JPEG có mtime sớm hơn 24 giờ, sau đó điều chỉnh điều kiện để cooldown chỉ áp dụng khi mtime không ở tương lai. Hoàn thành nghĩa là các tệp có mtime ở tương lai nhận được thumbnail trong khi các tệp vừa được sửa đổi vẫn tuân theo cooldown hiện có; build lại Nemo và lặp lại bài kiểm tra đã mô tả.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C
- Star
- 1.6k
- Fork
- 391
- Merge trung bình
- 2 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của linuxmint/nemo
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Copy dialog: Enter key accidentally cancels file copyCó thể đã có người làm @jackjusko đã nhận 9 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
linuxmint/nemo#3838 · 1 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
linuxmint/nemo#3805 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của linuxmint/nemo
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Claude:NeedsReview GPT:ConfirmedBug GPT:NeedsReview triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
open5gs/open5gs#5114 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
owntone/owntone-server#2071 ·
-
bgpd: 'address-family link-state' under a VRF instance silently produces unusable configurationĐang mởtriage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
FRRouting/frr#24557 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày