g_get_system_data_dirs() includes application's folder twice
- From: George Brink <siberianowl yahoo com>
- To: gtk-list gnome org
- Subject: g_get_system_data_dirs() includes application's folder twice
- Date: Mon, 22 Aug 2011 17:31:30 -0400
OS: WinXP SP3
GLIB: 2.26.1 and 2.28.1
Simple program which uses g_get_system_data_dirs():
---------- test.c ------------
#include <glib.h>
#include <w32api.h>
#define _WIN32_IE IE7
#include <shlobj.h>
int main(int argc, char **argv) {
int dirNumber;
const gchar* const *system_dirs = g_get_system_data_dirs();
for(dirNumber=0; system_dirs[dirNumber]; dirNumber++) {
g_print("%d: %s\n", dirNumber, system_dirs[dirNumber]);
}
char path[1024];
SHGetSpecialFolderPath(NULL, path, CSIDL_COMMON_APPDATA, 0);
g_print("APPDATA: %s\n", path);
SHGetSpecialFolderPath(NULL, path, CSIDL_COMMON_DOCUMENTS, 0);
g_print("DOCUMENTS: %s\n", path);
}
-----------------------------
it produces the output:
0: C:\Documents and Settings\All Users\Application Data
1: c:\dev\test\gtk_various_tests\share
2: C:\MinGW\share
3: c:\dev\test\gtk_various_tests\share
APPDATA: C:\Documents and Settings\All Users\Application Data
DOCUMENTS: C:\Documents and Settings\All Users\Documents
According to documentation:
http://developer.gimp.org/api/2.0/glib/glib-Miscellaneous-Utility-Functions.html#g-get-system-data-dirs
I am expecting output for g_get_system_data_dirs():
0: C:\Documents and Settings\All Users\Application Data
1: C:\Documents and Settings\All Users\Documents
2: c:\dev\test\gtk_various_tests\share
3: C:\MinGW\share
Is this a bug or am I reading documentation incorrectly?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]