diff options
author | Berke Viktor <bviktor@hexchat.org> | 2012-10-13 10:14:34 +0200 |
---|---|---|
committer | Berke Viktor <bviktor@hexchat.org> | 2012-10-13 10:14:34 +0200 |
commit | 6f1185c00e71d158216de692916ff4710b73ebbf (patch) | |
tree | 4618e238ff30174f47741d6d411c87493544101d /src | |
parent | ca3fa043f09b0684999f8881e65c22dfde875004 (diff) |
get_xdir_fs() cleanup
Diffstat (limited to 'src')
-rw-r--r-- | src/common/cfgfiles.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 1d0dc2a5..f3bb54b8 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -316,20 +316,18 @@ get_xdir_fs (void) { if (!xdir_fs) { - if (portable_mode ()) - { - xdir_fs = ".\\config"; - } - else - { char out[256]; - if (!get_reg_str ("Software\\Microsoft\\Windows\\CurrentVersion\\" - "Explorer\\Shell Folders", "AppData", out, sizeof (out))) - return "./config"; - xdir_fs = g_strdup_printf ("%s\\" "HexChat", out); - } + if (portable_mode () || !get_reg_str ("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "AppData", out, sizeof (out))) + { + xdir_fs = ".\\config"; + } + else + { + xdir_fs = g_strdup_printf ("%s\\" "HexChat", out); + } } + return xdir_fs; } |