diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/cfgfiles.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index f3bb54b8..61df96c6 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -763,11 +763,14 @@ load_config (void) { char out[256]; - if (get_reg_str ("Software\\Microsoft\\Windows\\CurrentVersion\\" - "Explorer\\Shell Folders", "Personal", out, sizeof (out))) - snprintf (prefs.dccdir, sizeof (prefs.dccdir), "%s\\Downloads", out); + if (portable_mode () || !get_reg_str ("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Personal", out, sizeof (out))) + { + snprintf (prefs.dccdir, sizeof (prefs.dccdir), "%s\\downloads", get_xdir_utf8 ()); + } else - snprintf (prefs.dccdir, sizeof (prefs.dccdir), "%s\\Downloads", get_xdir_utf8 ()); + { + snprintf (prefs.dccdir, sizeof (prefs.dccdir), "%s\\Downloads", out); + } } #else snprintf (prefs.sounddir, sizeof (prefs.sounddir), "%s/sounds", get_xdir_utf8 ()); |