Using: g_key_file_load_from_file() in homedir



Howdy list,

        In my program I'd like to store user private settings in the homedir of the current user in a 
Key_File. When loading the file this way:

        key_file = g_key_file_new();
        g_key_file_load_from_file(
                key_file,
                "/home/nikolaj/.DiamondBOX/Diamond.settings",
                G_KEY_FILE_KEEP_COMMENTS,
                0);

everything works, but when changing the path to "~/.DiamondBOX/Diamond.settings" nothing works!! Does this 
have to do with the concept of "GLib filename encoding"??? Or does g_key_file_load_from_file() simply not 
support the '~'??

        br - Nikolaj Thygesen :o)





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]