d99kris / nchat

Terminal-based Telegram / WhatsApp client for Linux and macOS
MIT License
524 stars 40 forks source link

Attachment downloads fail when trying to simulate XDG directories #191

Closed hseg closed 4 months ago

hseg commented 4 months ago

Description:

With nchat -d "$XDG_CONFIG_HOME"/nchat/, nchat still tries to download images to ~/.nchat, which doesn't exist. Even #171 is unsupported for now, at least I would expect either to be able to configure the cache directory, or that it should follow the setting of -d.

How to reproduce it:

mv ~/.nchat "$XDG_CONFIG_HOME"/nchat
nchat -d "$XDG_CONFIG_HOME"/nchat
# navigate to any message that contains an image

Environment:

d99kris commented 4 months ago

Hi @hseg - moving the nchat directory is not officially supported, although I haven't encountered issues with it myself. The suggested method is to specify directory already during setup stage. For example:

nchat -d ~/.my-nchat-dir -s
# and then after setup use:
nchat -d ~/.my-nchat-dir

I use this on daily basis on macOS and Linux with no issues.

hseg commented 4 months ago

On Fri, Feb 23, 2024 at 04:47:16AM -0800, Kristofer Berggren wrote:

Hi @hseg - moving the nchat directory is not officially supported, although I haven't encountered issues with it myself. The suggested method is to specify directory already during setup stage. For example:

nchat -d ~/.my-nchat-dir -s
# and then after setup use:
nchat -d ~/.my-nchat-dir

I use this on daily basis on macOS and Linux with no issues.

Right, which is what I did -- I even aliased nchat=nchat -d "$XDG_CONFIG_HOME"/nchat" to avoid this problem.

... Though playing around with it a little more on my end, trying to reproduce, it appears this was more an issue of my alias configuration being problematic than an nchat issue. Feel free to close -- I'll reraise the issue in case it comes up again.

d99kris commented 4 months ago

Ok thanks, I'll proceed to close for now.