[GH-ISSUE #524] The application does not remove the thumbnail file from the FS if it is removed in the original article #298

Closed
opened 2026-02-25 23:33:54 +03:00 by kerem · 3 comments
Owner

Originally created by @Katarn on GitHub (Oct 17, 2022).
Original GitHub issue: https://github.com/go-shiori/shiori/issues/524

Originally assigned to: @Monirzadeh on GitHub.

Data

  • Shiori version: commit 77269b7
  • Database Engine: SQLite
  • Operating system: Windows 8.1
  • CLI/Web interface/Web Extension: CLI

Describe the bug / actual behavior

The problem is described in the title of the issue.

Expected behavior

If a thumbnail is removed from the original article, then it should also be removed from the file system.

To Reproduce

Steps to reproduce the behavior:

  1. Save any HTML page with thumbnail from the internet to the localhost and serve it with any way (e. g. python -m SimpleHTTPServer 8080.
  2. Add a link to this page in Shiori. As you can see, an image file is created in the thumb directory.
  3. Remove all text and all image tags from the saved page.
  4. Click the update archive button. I also check both checkboxes: "Keep the old title and excerpt" and "Update archive as well".
  5. As you can see, the site thumbnail disappeared from Shiori's interface, but it remained in the file system.
Originally created by @Katarn on GitHub (Oct 17, 2022). Original GitHub issue: https://github.com/go-shiori/shiori/issues/524 Originally assigned to: @Monirzadeh on GitHub. ## Data - **Shiori version**: commit [77269b7](https://github.com/go-shiori/shiori/commit/77269b7a6420220a0af1fc9c381b5319fbdde686) - **Database Engine**: SQLite - **Operating system**: Windows 8.1 - **CLI/Web interface/Web Extension**: CLI ## Describe the bug / actual behavior The problem is described in the title of the issue. ## Expected behavior If a thumbnail is removed from the original article, then it should also be removed from the file system. ## To Reproduce Steps to reproduce the behavior: 1. Save any HTML page with thumbnail from the internet to the localhost and serve it with any way (e. g. `python -m SimpleHTTPServer 8080`. 2. Add a link to this page in Shiori. As you can see, an image file is created in the `thumb` directory. 3. Remove all text and all image tags from the saved page. 4. Click the update archive button. I also check both checkboxes: "Keep the old title and excerpt" and "Update archive as well". 5. As you can see, the site thumbnail disappeared from Shiori's interface, but it remained in the file system.
Author
Owner

@fmartingr commented on GitHub (Jul 21, 2023):

Whomever lands checking this out, please also check that all archive and ebook data is properly handled on cleanup as well.

Relates to: #634

<!-- gh-comment-id:1645345462 --> @fmartingr commented on GitHub (Jul 21, 2023): Whomever lands checking this out, please also check that all archive and ebook data is properly handled on cleanup as well. Relates to: #634
Author
Owner

@Monirzadeh commented on GitHub (Jul 27, 2023):

Are you sure we should update ebook with archive update (without user request) too?
So if an article has ebook before update, it should generate each time with update archive?

<!-- gh-comment-id:1654035680 --> @Monirzadeh commented on GitHub (Jul 27, 2023): Are you sure we should update ebook with archive update (without user request) too? So if an article has ebook before update, it should generate each time with update archive?
Author
Owner

@fmartingr commented on GitHub (Jul 29, 2023):

Are you sure we should update ebook with archive update (without user request) too? So if an article has ebook before update, it should generate each time with update archive?

No, not meaning that. But when this issue is checked we should apply the same logic for archives, thumbs and ebooks:

  • Download the appropriate asset
    • Success? -> Remove old asset and replace with new one.
    • Failure? -> Do not remove old asset and present error to the user. #634
<!-- gh-comment-id:1656578402 --> @fmartingr commented on GitHub (Jul 29, 2023): > Are you sure we should update ebook with archive update (without user request) too? So if an article has ebook before update, it should generate each time with update archive? No, not meaning that. But when this issue is checked we should apply the same logic for archives, thumbs and ebooks: - Download the appropriate asset - Success? -> Remove old asset and replace with new one. - Failure? -> **Do not** remove old asset and present error to the user. #634
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#298
No description provided.