• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[Release] Micro Fix for Patcher

Junior Spellweaver
Joined
Feb 2, 2012
Messages
164
Reaction score
56
This fix is for anyone whom has multiple files with the same name existing within their client. The default patcher will error out without a temp directory structure for those file names.

Example if you have a config.xml in the main gunz directory, but a Quest folder with a different config.xml, the patcher will error out forcing you to reattempt patching.

Structure
[GunZ]->config.xml "Gets CRC, downloads and patches"
[GunZ/Interface/]->config.xml "Thinks it is the config.xml above it, invalid crc, fails to patch, must be manually reattempted"
[GunZ/Custom/]->config.xml "Same issue as above"

If you have multiple required files with the same name, but in different locations, it will error out until keep trying to download them individually. To fix this, i've added a /dir/ inside of the PATCH directory specifying its location.

In ZUpdate.cpp replace:

C++:
void GetTempFilePathName( const char* szFileName, char* szTmpFileName)
{
    char szDir[ _MAX_DIR];
    GetCurrentDirectory( sizeof( szDir), szDir);


    char drive[ _MAX_PATH], dir[ _MAX_PATH], fname[ _MAX_PATH], ext[ _MAX_PATH];
    _splitpath( szFileName, drive, dir, fname, ext);


    sprintf( szTmpFileName, "%s\\%s\\%s\\%s%s_", szDir, STR_TEMP_DOWNLOADFOLDER, dir, fname, ext);
}
 
Experienced Elementalist
Joined
Oct 14, 2015
Messages
293
Reaction score
86
This fix is for anyone whom has multiple files with the same name existing within their client. The default patcher will error out without a temp directory structure for those file names.

Example if you have a config.xml in the main gunz directory, but a Quest folder with a different config.xml, the patcher will error out forcing you to reattempt patching.

Structure
[GunZ]->config.xml "Gets CRC, downloads and patches"
[GunZ/Interface/]->config.xml "Thinks it is the config.xml above it, invalid crc, fails to patch, must be manually reattempted"
[GunZ/Custom/]->config.xml "Same issue as above"

If you have multiple required files with the same name, but in different locations, it will error out until keep trying to download them individually. To fix this, i've added a /dir/ inside of the PATCH directory specifying its location.

In ZUpdate.cpp replace:

C++:
void GetTempFilePathName( const char* szFileName, char* szTmpFileName)
{
    char szDir[ _MAX_DIR];
    GetCurrentDirectory( sizeof( szDir), szDir);


    char drive[ _MAX_PATH], dir[ _MAX_PATH], fname[ _MAX_PATH], ext[ _MAX_PATH];
    _splitpath( szFileName, drive, dir, fname, ext);


    sprintf( szTmpFileName, "%s\\%s\\%s\\%s%s_", szDir, STR_TEMP_DOWNLOADFOLDER, dir, fname, ext);
}
Thanks for sharing this, few would notice this launcher update glitch.
It will be of great help to the area.
 
Back
Top