flathub / io.mpv.Mpv

https://flathub.org/apps/details/io.mpv.Mpv
8 stars 19 forks source link

Cannot write screenshot if `xdg-pictures` is a symlink #474

Closed PaperNick closed 1 month ago

PaperNick commented 1 month ago

Currently, when the xdg-pictures directory is set to a symlink in other HDD, mpv cannot write a screenshot.

Illustration: HDD1: /home/user/Pictures is a symlink which points to HDD2 - /media/hdd2/files/Pictures HDD2: /media/hdd2/files/Pictures

In this scenario I get Error Writing Screenshot in the mpv app.

The workaround I've found is to add this path in the allowed directories (using Flatseal):

~/.var/app/io.mpv.Mpv/Pictures

Wanted to ask if it's possible to solve this issue without a workaround.

PaperNick commented 1 month ago

I dug a bit deeper and saw that the XDG_PICTURES_DIR env var in ~/.config/user-dirs.dirs was set to "$HOME/" for some reason.

After changing it back to: XDG_PICTURES_DIR="$HOME/Pictures" it worked without problem. There's no need to include ~/.var/app/io.mpv.Mpv/Pictures now.