psst icon indicating copy to clipboard operation
psst copied to clipboard

Psst stores cached songs twice in two different directories

Open Self-Perfection opened this issue 1 year ago • 2 comments

Describe the bug I see that psst creates lots of /tmp/.tmpXXXXXX files. Some of them are about 5-20 MiB and identical to some files in ~/.cache/Psst/audio/. Others are about 400 KiB. Probably albums covers cache. That I have not checked

To Reproduce Use psst under GNU/Linux? Probably to trigger this bug /tmp and ~/.cache has to be on different volumes.

Expected behavior Cache files should be created in the same directory where they will be eventually stored.

Environment

  • OS: Ubuntu Linux 22.04
  • Version: 69314f9, built 2024-11-12

Additional context In my setup /tmp and ~/.cache are actually 2 different Btrfs subvolumes.

In my case these files do not actually consume extra space as it seems they are reflinked. And therefore occupied storage space is not doubled. But for people with different filesystems for /tmp and ~/.cache this issue might lead to effective duplication of consumed cache space.

Also when cache cleanup option will be implemented it might clean just ~/.cache/Psst without removing file copies from /tmp. So it will not free up space.

Self-Perfection avatar Dec 05 '24 18:12 Self-Perfection

#536

SO9010 avatar Dec 20 '24 00:12 SO9010

I recommend running Psst via firejail --private-tmp as workaround for this.

Self-Perfection avatar May 05 '25 21:05 Self-Perfection