bucanero / pkgi-psp

A PlayStation Portable (PSP) package download tool
http://www.bucanero.com.ar/
MIT License
145 stars 8 forks source link

.pkg download cache issue - taking space even if removed #13

Closed Tea-pot closed 9 months ago

Tea-pot commented 9 months ago

First of all thank you for this port, appreciated! Issue:

_Where to remove interrupted/failed downloads to free up disk space?

Check the ms0:/PKG/ folder - each download will be in a separate .pkg file by its content ID. Simply delete the file and start again._

mentioned solution does not work. Space is taken and have not been restored. tested with EP9000-NPEG00007_00-GNAMCOMUS2GO0002 PSP model 1004 modded, 6.61 PRO C2 + infinity 2.0.3

Tea-pot commented 9 months ago

I have also deleted PKG and all files using PSP Filer - space has not been restored. Do you happen to know where the cache folder is, or how the download of .pkg is handled?

bucanero commented 9 months ago

downloads are only stored in ms0:/PKG. But maybe you have a broken install folder taking space?

keep in mind, you need 2X space to install, if you have a 100 Mb package, you need at least 200Mb free. (100 to download, + 100 to install)

Tea-pot commented 9 months ago

Thank you. I understand it much better now. I could not finda any broken/corrupted files unfortunately in any of those locations, I have already removed PKG folder and all content. I made some space now and I will test this again - the same game, the same source PKGi to ms0:/PKG i will keep you posted.

Tea-pot commented 9 months ago

Some findings: I have freed up 1400mb ( in total I should have almost 1900mb since I have lost 542mb once downloading EP9000-NPEG00007_00-GNAMCOMUS2GO0002 - ending up with power outage - battery died console was not plugged in file in PKG was 0kb in size ), I have performed the same test - attempting to download file, console was not plugged in - died, I have lost 200mb - non recoverable - no trace of file / cache. I have attempted the same once again - successfully downloaded and installed EP9000-NPEG00007_00-GNAMCOMUS2GO0002 - works as intended - total space left 732mb.

image

bucanero commented 9 months ago

Well, if your PSP shut down while downloading as it ran out of power, then it's not an issue with the app. It's a file system integrity issue. Probably the .pkg file descriptor was open, then the battery went out, and the FAT table was never updated properly with the downloaded data. So, blocks are marked as used, but the file system ends up in an inconsistent state.

My suggestion, you have two options: try a scandisk tool, and see if Windows can detect and fix the FAT32 file system, or the other option is to backup everything, then format and restore data.

As a side note, I'm adding a battery indicator so users know the current batt level #11

Tea-pot commented 9 months ago

Thank you. I do not blame app itself, I blame myself definitely for messing with power, just wanted to check how this will be handled. Thank you for suggestions. As there is no issue with app - 'cache' issue or mess with FAT table is another sort of issue that has nothing to do with app, this can be closed. It was more on a site of curiosity and for the others to be aware of.

Thank you for battery indicator, this will be handy.

bucanero commented 9 months ago

Thank you for battery indicator, this will be handy.

if you want, feel free to test the latest build with the battery display: https://github.com/bucanero/pkgi-psp/actions/runs/6553994915

just go there and download the "Artifact" link, then you can install and test it.

btw, this build also has an updated "free space check", it will block downloads if you don't have 2X the .pkg size free.

Tea-pot commented 9 months ago

Thanks for sharing, I will keep you posted.