diff --git a/xpinstall/packager/packages-win b/xpinstall/packager/packages-win index 80850cd375bd..03243f1aa354 100644 --- a/xpinstall/packager/packages-win +++ b/xpinstall/packager/packages-win @@ -387,6 +387,7 @@ bin\components\mdn-service.js bin\components\nsSetDefaultMail.js bin\components\nsUnsetDefaultMail.js ;these Palm Sync files are conditionally built so would not exist unless built +bin\mozABConduit.dll bin\PalmSyncProxy.dll bin\PalmSyncInstall.exe bin\components\palmsync.dll diff --git a/xpinstall/wizard/windows/palmsync/PalmSyncInstall.cpp b/xpinstall/wizard/windows/palmsync/PalmSyncInstall.cpp index 33998d76478c..0f1cdc0c5bc3 100644 --- a/xpinstall/wizard/windows/palmsync/PalmSyncInstall.cpp +++ b/xpinstall/wizard/windows/palmsync/PalmSyncInstall.cpp @@ -342,8 +342,14 @@ int InstallConduit() // Applications should not place conduits in the Palm Desktop directory. // The Palm Desktop installer only manages the Palm Desktop conduits. TCHAR szConduitPath[_MAX_PATH]; - if(!GetCurrentDirectory(_MAX_PATH, szConduitPath)) + if(!GetModuleFileName(NULL, szConduitPath, _MAX_PATH)) return IDS_ERR_CONDUIT_NOT_FOUND; + // extract the dir path (without the module name) + int index = strlen(szConduitPath)-1; + while((szConduitPath[index] != DIRECTORY_SEPARATOR) && index) + index--; + szConduitPath[index] = 0; + // take care of any possible string overwrites if((strlen(szConduitPath) + strlen(DIRECTORY_SEPARATOR_STR) + strlen(CONDUIT_FILENAME)) > _MAX_PATH) return IDS_ERR_LOADING_CONDMGR;