By default, use <config>/downloads for DCC file transfers when in portable mode
This commit is contained in:
parent
dfd4828ad2
commit
05b6e0b330
|
@ -763,11 +763,14 @@ load_config (void)
|
||||||
{
|
{
|
||||||
char out[256];
|
char out[256];
|
||||||
|
|
||||||
if (get_reg_str ("Software\\Microsoft\\Windows\\CurrentVersion\\"
|
if (portable_mode () || !get_reg_str ("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Personal", out, sizeof (out)))
|
||||||
"Explorer\\Shell Folders", "Personal", out, sizeof (out)))
|
{
|
||||||
snprintf (prefs.dccdir, sizeof (prefs.dccdir), "%s\\Downloads", out);
|
snprintf (prefs.dccdir, sizeof (prefs.dccdir), "%s\\downloads", get_xdir_utf8 ());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
snprintf (prefs.dccdir, sizeof (prefs.dccdir), "%s\\Downloads", get_xdir_utf8 ());
|
{
|
||||||
|
snprintf (prefs.dccdir, sizeof (prefs.dccdir), "%s\\Downloads", out);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
snprintf (prefs.sounddir, sizeof (prefs.sounddir), "%s/sounds", get_xdir_utf8 ());
|
snprintf (prefs.sounddir, sizeof (prefs.sounddir), "%s/sounds", get_xdir_utf8 ());
|
||||||
|
|
|
@ -165,7 +165,7 @@ fe_dcc_send_filereq (struct session *sess, char *nick, int maxcps, int passive)
|
||||||
mdc->passive = passive;
|
mdc->passive = passive;
|
||||||
|
|
||||||
snprintf (tbuf, sizeof tbuf, _("Send file to %s"), nick);
|
snprintf (tbuf, sizeof tbuf, _("Send file to %s"), nick);
|
||||||
gtkutil_file_req (tbuf, dcc_send_filereq_file, mdc, NULL, NULL, FRF_MULTIPLE);
|
gtkutil_file_req (tbuf, dcc_send_filereq_file, mdc, prefs.dccdir, NULL, FRF_MULTIPLE|FRF_FILTERISINITIAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue