aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 26be1a2..c77f2da 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -4038,7 +4038,10 @@ def download_files(message_json, channel):
download_location = config.files_download_location
if not download_location:
return
- download_location = w.string_eval_path_home(download_location, {}, {}, {})
+ options = {
+ "directory": "data",
+ }
+ download_location = w.string_eval_path_home(download_location, {}, {}, options)
if not os.path.exists(download_location):
try:
@@ -5819,7 +5822,7 @@ def command_upload(data, current_buffer, args):
Uploads a file to the current buffer.
"""
channel = EVENTROUTER.weechat_controller.buffers[current_buffer]
- weechat_dir = w.info_get("weechat_dir", "")
+ weechat_dir = w.info_get("weechat_data_dir", "") or w.info_get("weechat_dir", "")
file_path = os.path.join(weechat_dir, os.path.expanduser(args))
if channel.type == "team":
@@ -6086,7 +6089,9 @@ def create_slack_debug_buffer():
def load_emoji():
try:
- weechat_dir = w.info_get("weechat_dir", "")
+ weechat_dir = w.info_get("weechat_data_dir", "") or w.info_get(
+ "weechat_dir", ""
+ )
weechat_sharedir = w.info_get("weechat_sharedir", "")
local_weemoji, global_weemoji = (
"{}/weemoji.json".format(path) for path in (weechat_dir, weechat_sharedir)