[GH-ISSUE #563] Psst stores cached songs twice in two different directories #337

Open
opened 2026-02-28 14:32:17 +03:00 by kerem · 2 comments
Owner

Originally created by @Self-Perfection on GitHub (Dec 5, 2024).
Original GitHub issue: https://github.com/jpochyla/psst/issues/563

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.

Originally created by @Self-Perfection on GitHub (Dec 5, 2024). Original GitHub issue: https://github.com/jpochyla/psst/issues/563 **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.
Author
Owner

@SO9010 commented on GitHub (Dec 20, 2024):

#536

<!-- gh-comment-id:2556042382 --> @SO9010 commented on GitHub (Dec 20, 2024): #536
Author
Owner

@Self-Perfection commented on GitHub (May 5, 2025):

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

<!-- gh-comment-id:2852394794 --> @Self-Perfection commented on GitHub (May 5, 2025): I recommend running Psst via `firejail --private-tmp` as workaround for this.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/psst#337
No description provided.