hippie68/ftpdump

places files and directories in wrong paths for patches

TheRadziu opened this issue · 8 comments

Your script works awesome for base games, but for patches it throws most stuff in the root of the CUSAXXXXX-patch directory, for example Marvel's Guardians of the galaxy 1.05 patch:
image
the randomly named res files should be in /CUSAXXXXX-patch/runtime/ directory, about and changeinfo should be in CUSAXXXX-patch/sce_sys which ftp confirms:
image

Same with KH: Melody of Memory:
image
about, changeinfo, trophy should be in CUSAXXXXX-patch/sce_sys
Metadata, Modules, Plugins, StreamingAssets, globalgamemanagers and globalgamemanagers.assets should be in /CUSAXXXXX-patch/Media which doesnt exist at all

usage of --use-pfs might be workaround for this issue, but i havent tested it yet.
--use-pfs generates proper directory layout but majority of files are 0kb in size, also eboot and other modules are just missing.

Same with Nier Replicant
image
image
Thats the diffrences

It could help to run the script with options --verbose and/or --debug, to see what's happening to the paths. I am not on 9.00 and can't test those games. Does it happen with any game?

It could help to run the script with options --verbose and/or --debug, to see what's happening to the paths. I am not on 9.00 and can't test those games. Does it happen with any game?

so far happened on three we tested and listed. below are --verbose and --debug logs for KH Melody of memory 1.04 patch since its smallest in size:
verbose_log.txt
debug_log.txt

Appears to be a bug in the path. It is important to specify HOSTNAME or IP_ADDRESS without trailing slashes.

For example:

ftpdump 192.168.1.2:2121 -p

Instead of:

ftpdump 192.168.1.2:2121/ -p

I will fix this in a new update. In the meantime, you should be able to dump by not adding slashes. There might be more to it, but if you did run a separate command for patches that had a trailing slash, I think this should be the fix.

The optional PFS extraction might be broken for now.

i have ip & port set in script itself, without any additional slashes, used ftpdump IP:PORT -p earlier too and resulted in exact same issue

For reasons unknown the script cuts more directories than it should. I could not reproduce the bug on my machines, however I made some changes which could help. Please run the attached script with option --debug and tell me if the bug has been fixed.

It should say "DEBUG: Dumping directory "xxx", cutting 4 directories." when starting to dump a patch. I would expect the bug to happen if the number is 5, which it shouldn't be. But perhaps it is fixed now.

ftpdump.zip

on the first glance it seems to be correct now DEBUG: Dumping directory "/mnt/sandbox/pfsmnt/CUSA11379-patch0/", cutting 4 directories.
I'm testing on another title (MK11 Ultimate) than reported in the issue, but it had same issue, putting /Asset/* to /*, with attached version files do go to Asset directory as they should. Since its 30gb patch I'll edit message later if /sce_sys/ subdirectories are in proper places too

edit: all seems good. you can push it to main

PFS extraction should now be fixed, thank you for reporting.