mienaiyami / yomikiru

An offline desktop reader for manga, comics, and novels. Offers a customizable reading experience with extensive settings, shortcuts, themes and layouts. Manga reader / Manhwa reader / Webtoon Reader / EPUB Reader. **Not a downloader**
MIT License
223 stars 10 forks source link

Temp Files are not being cleared on app exit #131

Closed omodia closed 1 year ago

omodia commented 1 year ago

Setup or portable version of the app?

Portable

Steps to reproduce

Temp Files Directory - C:\Users\ Your Pc Username Here \AppData\Local\Temp

  1. Open any zip, cbz, epub file in yomikiru.
  2. After they are unzipped and loaded, open temp files directory.
  3. You can see all the temporary files stored there with the names and extension of the zip, cbz, epub previously opened by the app.

✔️ Expected Behavior

❌ Actual Behavior

mienaiyami commented 1 year ago

I am using portable version, So the temp files should be stored in the portable directory. And the temp files should be deleted from the portable directory on app exit.

I'm not sure if that's how it is supposed to work. Temp directory is managed by the system and is recommended for this kind of work. Though it is possible to make it that way but then I will hate to create different rules for portable and setup version. As for the deleting, there might be some issue there, I'll check that.

omodia commented 1 year ago

Please check if the same is also happening for image files.

I'm not sure if that's how it is supposed to work. Temp directory is managed by the system and is recommended for this kind of work. Though it is possible to make it that way but then I will hate to create different rules for portable and setup version.

Edit - After some delibaration, I too think leaving the temp files in the system temp directory is the best choice. Ignore the thing about storing temp data in portable directory. It sounded good on paper, but not now.

As for the deleting, there might be some issue there, I'll check that.

Thank you.

omodia commented 1 year ago

Temp directory is managed by the system and is recommended for this kind of work.

So I looked for a way and found storage sense. My storage sense was at the default option, so the temp files were never cleared by the system. I can do a weekly schedule to fix it.

omodia commented 1 year ago

No rush, take your time to look into this matter. Thank you for your work.

zeoint commented 1 year ago

@omodia

It is better to use the temp directory for the temp files as it is cleaned by storage sense. Many other portable apps also use the temp directory for storing temp files.

zeoint commented 1 year ago
  1. After running storage sense, every temp file of yomikiru is cleared except one folder.
  2. That folder contained mimetype as name.
  3. It is from last week, but look at the date.

1

2

omodia commented 1 year ago

@omodia

It is better to use the temp directory for the temp files as it is cleaned by storage sense. Many other portable apps also use the temp directory for storing temp files.

@zeoint

I agree. At first, it sounded good on paper, but after some delibaration, I too said above that storing temp files in temp folder is best.

zeoint commented 1 year ago

Temp files are not cleared on app exit, instead they are only cleared on clicking the home button. For epub, as it is 30 mb, it causes the app to freeze for 2 seconds. I mentioned it here, as it was marked as closed, but is still happening.

zeoint commented 1 year ago

Even if the temp files are not cleared on app exit. It's not a problem.

But the temp files are cleared by clicking on home icon, that causes the app to freeze for 2 seconds. This is the problem.

Please remove that (Clearing temp files when clicked on home icon, so as to not freeze the app).