summaryrefslogtreecommitdiff
path: root/src/plugins/fifo/fifo.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2021-05-02 11:56:25 +0200
committerSébastien Helleu <flashcode@flashtux.org>2021-05-11 21:06:34 +0200
commit0f9640a5f33d4d0c76df75cb7a6cb07baac049f0 (patch)
tree7d09fe5119b11d4d38313098e6846e2413ff0a19 /src/plugins/fifo/fifo.c
parent4c5fcb743b2e512c407a09ca95d155c9e6edd2bd (diff)
downloadweechat-0f9640a5f33d4d0c76df75cb7a6cb07baac049f0.zip
core: split WeeChat home in 4 directories, use XDG directories by default (issue #1285)
The 4 directories (which can be the same): - config: configuration files, certificates - data: log/upgrade files, local plugins, scripts, xfer files - cache: script repository, scripts downloaded (temporary location) - runtime: FIFO pipe, relay UNIX sockets
Diffstat (limited to 'src/plugins/fifo/fifo.c')
-rw-r--r--src/plugins/fifo/fifo.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/plugins/fifo/fifo.c b/src/plugins/fifo/fifo.c
index a266f7f69..d9d8f3ac7 100644
--- a/src/plugins/fifo/fifo.c
+++ b/src/plugins/fifo/fifo.c
@@ -65,16 +65,26 @@ void
fifo_create ()
{
struct stat st;
+ struct t_hashtable *options;
if (!weechat_config_boolean (fifo_config_file_enabled))
return;
if (!fifo_filename)
{
- /* replace %h and "~", evaluate path */
+ /* evaluate path */
+ options = weechat_hashtable_new (
+ 32,
+ WEECHAT_HASHTABLE_STRING,
+ WEECHAT_HASHTABLE_STRING,
+ NULL, NULL);
+ if (options)
+ weechat_hashtable_set (options, "directory", "runtime");
fifo_filename = weechat_string_eval_path_home (
weechat_config_string (fifo_config_file_path),
- NULL, NULL, NULL);
+ NULL, NULL, options);
+ if (options)
+ weechat_hashtable_free (options);
}
if (!fifo_filename)