1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

If /SET dcc_upload_path is empty, we should use the current directory, not

root directory.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2074 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-11-19 02:46:26 +00:00 committed by cras
parent b3c0778dc4
commit 65c9a361ab
2 changed files with 8 additions and 3 deletions

View File

@ -114,8 +114,12 @@ static void sig_dcc_send_complete(GList **list, WINDOW_REC *window,
/* completing filename parameter for /DCC SEND */ /* completing filename parameter for /DCC SEND */
path = convert_home(settings_get_str("dcc_upload_path")); path = convert_home(settings_get_str("dcc_upload_path"));
if (*path == '\0') {
/* use the default path */
g_free_and_null(path);
}
*list = filename_complete(word, path); *list = filename_complete(word, path);
g_free(path);
if (*list != NULL) { if (*list != NULL) {
*want_space = FALSE; *want_space = FALSE;

View File

@ -155,7 +155,8 @@ static char *dcc_send_get_file(const char *fname)
g_free(str); g_free(str);
path = convert_home(settings_get_str("dcc_upload_path")); path = convert_home(settings_get_str("dcc_upload_path"));
str = g_strconcat(path, G_DIR_SEPARATOR_S, fname, NULL); str = *path == '\0' ? g_strdup(fname) :
g_strconcat(path, G_DIR_SEPARATOR_S, fname, NULL);
g_free(path); g_free(path);
} }