Mercurial > pidgin
comparison libpurple/plugins/log_reader.c @ 20930:d0fdf2f95277
Leak fix.
| author | Daniel Atallah <daniel.atallah@gmail.com> |
|---|---|
| date | Sun, 14 Oct 2007 20:25:20 +0000 |
| parents | b2b16843851b |
| children | f56e94167372 |
comparison
equal
deleted
inserted
replaced
| 20929:76df08dd7d7b | 20930:d0fdf2f95277 |
|---|---|
| 2669 /* Add aMSN Messenger log directory preference. */ | 2669 /* Add aMSN Messenger log directory preference. */ |
| 2670 purple_prefs_add_none("/plugins/core/log_reader/amsn"); | 2670 purple_prefs_add_none("/plugins/core/log_reader/amsn"); |
| 2671 | 2671 |
| 2672 /* Calculate default aMSN log directory. */ | 2672 /* Calculate default aMSN log directory. */ |
| 2673 #ifdef _WIN32 | 2673 #ifdef _WIN32 |
| 2674 path = NULL; | |
| 2674 folder = wpurple_get_special_folder(CSIDL_PROFILE); /* Silly aMSN, not using CSIDL_APPDATA */ | 2675 folder = wpurple_get_special_folder(CSIDL_PROFILE); /* Silly aMSN, not using CSIDL_APPDATA */ |
| 2675 path = g_build_filename(folder, "amsn", NULL); | 2676 if (folder) { |
| 2677 path = g_build_filename(folder, "amsn", NULL); | |
| 2678 g_free(folder); | |
| 2679 } | |
| 2676 #else | 2680 #else |
| 2677 path = g_build_filename(purple_home_dir(), ".amsn", NULL); | 2681 path = g_build_filename(purple_home_dir(), ".amsn", NULL); |
| 2678 #endif | 2682 #endif |
| 2679 purple_prefs_add_string("/plugins/core/log_reader/amsn/log_directory", path); | 2683 purple_prefs_add_string("/plugins/core/log_reader/amsn/log_directory", path ? path : ""); |
| 2680 g_free(path); | 2684 g_free(path); |
| 2681 } | 2685 } |
| 2682 | 2686 |
| 2683 static gboolean | 2687 static gboolean |
| 2684 plugin_load(PurplePlugin *plugin) | 2688 plugin_load(PurplePlugin *plugin) |
