Fix autostart of the portable version.

The current directory of the programs started from the registry run key is not the application directory. Now the current directory is changed to the application directory on start of RetroShare on Windows.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3751 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-11-04 22:54:18 +00:00
parent 37c71b4d71
commit 3fa3e2d6db

View File

@ -54,6 +54,14 @@
int main(int argc, char *argv[])
{
#ifdef WINDOWS_SYS
{
/* Set the current directory to the application dir,
because the start dir with autostart from the registry run key is not the exe dir */
QApplication app(argc, argv);
QDir::setCurrent(QCoreApplication::applicationDirPath());
}
#endif
QStringList args = char_array_to_stringlist(argv+1, argc-1);