ps2homebrew / wLaunchELF

ELF loader and File browser for Sony PlayStation 2
Other
500 stars 51 forks source link

Cant rename file/folders on a mounted VMC #28

Closed carl0sjt closed 5 years ago

carl0sjt commented 5 years ago

The rename function doesnt do nothing when used with VMCs.

Tested with wLaunchELF v4.43a wed oct 31 16:52:25 2018 commit: 66ca9b2 and previous versions of wLaunchELF.

sp193 commented 5 years ago

Are you able to compile LaunchELF yourself?

I think the VMC module does not rename files correctly. This line:

writePage(gendata.fd, (unsigned char *)&dirent, (dirent_cluster * g_Vmc_Image[f->unit].header.pages_per_cluster) + gendata.dirent_page);

...should have probably been:

writePage(gendata.fd, (unsigned char *)&dirent, (dirent_cluster + gendata.first_allocatable) * g_Vmc_Image[unit].header.pages_per_cluster + gendata.dirent_page);

The existing line does not consider _gendata.firstallocatable.

carl0sjt commented 5 years ago

Oh, thanks for taking a look at it :). I cant compile :|

sp193 commented 5 years ago

I think it'll be fine.... although I cannot test this either. 9d9f8ca If there will be more to add to this issue, please feel free to reopen it.