Add a option with the directory where to store files transfered
authorNicolas Cornu <nicolas.cornu@ensi-bourges.fr>
Mon, 19 Jul 2010 17:11:44 +0200
changeset 56 2ee6da0e59cb
parent 55 bc0281fee13d
child 57 23df37238a3a
Add a option with the directory where to store files transfered
jingle-filetransfer/filetransfer.c
--- a/jingle-filetransfer/filetransfer.c	Sun Jul 18 21:59:06 2010 +0200
+++ b/jingle-filetransfer/filetransfer.c	Mon Jul 19 17:11:44 2010 +0200
@@ -27,6 +27,7 @@
 #include <mcabber/modules.h>
 #include <mcabber/utils.h>
 #include <mcabber/xmpp_helper.h>
+#include <mcabber/settings.h>
 
 #include <jingle/jingle.h>
 #include <jingle/check.h>
@@ -108,6 +109,7 @@
   }
 
   ft->name = g_path_get_basename(ft->name);
+  ft->name = g_build_filename(settings_opt_get("jingle_ft_dir"), ft->name, NULL);
   if (!g_strcmp0(ft->name, ".")) {
     g_set_error(err, JINGLE_CHECK_ERROR, JINGLE_CHECK_ERROR_BADVALUE,
                 "the offered file has an invalid filename");