nschlia / ffmpegfs

FUSE-based transcoding filesystem with video support from many formats to FLAC, MP4, TS, WebM, OGG, MP3, HLS, and others.
https://nschlia.github.io/ffmpegfs/
GNU General Public License v3.0
198 stars 14 forks source link

Move cache to $XDG_CACHE_HOME #47

Closed 14mRh4X0r closed 4 years ago

14mRh4X0r commented 4 years ago

Commit 769dddd moved ffmpegfs' cache directory from /tmp to /var/cache. The latter requires setting proper ownership and permissions for users to use ffmpegfs.

This pull request moves the (default location of the) cache to the user-specific $XDG_CACHE_HOME, with a fallback to ~/.cache, as specified by the XDG Base Directory Specification.

nschlia commented 4 years ago

Cheers man! This is a change I wanted to do myself, but found no time to. I'll push it into my code ASAP!

14mRh4X0r commented 4 years ago

No problem. Came up with it while trying to package version 1.9, but took a while to get around to. You might want to check whether the manpage suffices, it's rather terse and uses shell syntax.

nschlia commented 4 years ago

I've merged the changes to my master branch. The manpage should refer to "XDG_CACHE_HOME", not "XDG_CACHE_DIR" and I'll add a hint to the $HOME/.cache/ffmpegfs fallback, but it's fine so far. I'll also have the directory removed on "make uninstall" via uninstall hook.

Thank's for your contribution!