pidgin: b48d2141: Make wpurple_install_dir() (DATADIR) rel...

datallah at pidgin.im datallah at pidgin.im
Mon Aug 30 22:01:37 EDT 2010


----------------------------------------------------------------------
Revision: b48d2141b875b2aa76ed704628366486a34a529a
Parent:   5125b363023fd23274b20c695fa3ff7e7bcb89c3
Author:   datallah at pidgin.im
Date:     08/30/10 20:53:15
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/b48d2141b875b2aa76ed704628366486a34a529a

Changelog: 

Make wpurple_install_dir() (DATADIR) relative to the libpurple dll instead of the executable file that launched the process

Changes against parent 5125b363023fd23274b20c695fa3ff7e7bcb89c3

  patched  libpurple/win32/win32dep.c

-------------- next part --------------
============================================================
--- libpurple/win32/win32dep.c	4d5908badd47a0865a09e587eda38e36f6ece15c
+++ libpurple/win32/win32dep.c	e14d7c31f0c286696d1052eb5178ac3850b5c50d
@@ -35,7 +35,7 @@ static char *app_data_dir = NULL, *insta
 static char *app_data_dir = NULL, *install_dir = NULL,
 	*lib_dir = NULL, *locale_dir = NULL;
 
-static HINSTANCE libpurpledll_hInstance = 0;
+static HINSTANCE libpurpledll_hInstance = NULL;
 
 /*
  *  PUBLIC CODE
@@ -130,7 +130,7 @@ const char *wpurple_install_dir(void) {
 	if (!initialized) {
 		char *tmp = NULL;
 		wchar_t winstall_dir[MAXPATHLEN];
-		if (GetModuleFileNameW(NULL, winstall_dir,
+		if (GetModuleFileNameW(libpurpledll_hInstance, winstall_dir,
 				MAXPATHLEN) > 0) {
 			tmp = g_utf16_to_utf8(winstall_dir, -1,
 				NULL, NULL, NULL);


More information about the Commits mailing list