JeffRuLz / TMFH

DSi Title Manager for HiyaCFW
GNU General Public License v3.0
31 stars 11 forks source link

Does not work with >=64 GB SD Cards #1

Closed bendevnull closed 5 years ago

bendevnull commented 5 years ago

I've run into an issue (both in the official release and my fork) where the application returns that the SD card doesn't have enough space to install a title on at least 64 GB SD cards. I don't know what the lower limit of the size here is. I'm not sure if this is something you can fix or not, but I'm reporting this issue anyway.

JeffRuLz commented 5 years ago

What does the Test Menu say? I'm guessing it's a negative number.

bendevnull commented 5 years ago

Haven't tried the test menu yet. I noticed it while I was trying to install a title with my fork, and it wouldn't let me install the title. I will check the test menu at lunch today, but I assume it would be a negative number due to an overflow somewhere. Maybe try changing the type of int to int64? Unless that's not supported by the DSi. I can do a bit of testing when I get home myself too.

JeffRuLz commented 5 years ago

Converting it to an unsigned int/long might work. I was hesitant to do that originally because a negative value might be an error, but statvfs returns -1 on an error.

bendevnull commented 5 years ago

You could implement a check for the -1. In fact, I could check for the -1 when I have the time (Won't be until Friday). It may just be erroring with the size of my card. My thoughts are either an error, or an overflow.

JeffRuLz commented 5 years ago

I've uploaded a new commit. Can you compile and test it when you get the chance? I don't have a large card to test it myself.

bendevnull commented 5 years ago

Yes, this tweak fixed the issue. Thanks!

Issue Fixed in Commit 370be5352862211fdf45cb092d16d9969a25c75d