emmercm / igir

🕹 A video game ROM collection manager to help filter, sort, patch, archive, and report on collections on any OS.
https://igir.io/
GNU General Public License v3.0
306 stars 15 forks source link

Ability to specify where to store the checksum cache #1060

Closed TheBrainScrambler closed 1 month ago

TheBrainScrambler commented 3 months ago

Is your feature request related to a problem?

I use igir as a package for the NixOS linux distributions, where all packages are stored in a read-only filesystem. igir is for example stored in /nix/store/3p7v7hfk60kqwhca514l3khvl4nbwa3f-igir-2.6.1. The problem is that igir tries to write the checksum cache in that directory, as you can see in the error below:

Σ Scanning for DATs ·········· | ██████████████████████▒░░ | 278/312 | ETA: 8snode:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[Error: EROFS: read-only file system, open '/nix/store/3p7v7hfk60kqwhca514l3khvl4nbwa3f-igir-2.6.1/lib/node_modules/igir/igir.cache.v6n76u{
  errno: -30,
  code: 'EROFS',
  syscall: 'open',
  path: '/nix/store/3p7v7hfk60kqwhca514l3khvl4nbwa3f-igir-2.6.1/lib/node_modules/igir/igir.cache.v6n76u'
}

Node.js v20.11.1

As can you see in the error, it's with igir 2.6.1

Describe the solution you'd like

It would be better to have the cache stored in the user's $HOME, for example in the right XDG directory, or in $HOME/.cache/igir . But at least it would be nice if I had a flag to say myself where I want the cache to be store. Something ike --cache-dir <dir> perhaps ?

Additional context

No response

emmercm commented 3 months ago

This is a good suggestion, I will work on it. You will probably need to use v2.5.3 until the problem can be fixed.

I've been working on fixing a performance regression affecting "raw copying" (when copying or moving without explicitly zipping or extracting). I'll work on this after.

emmercm commented 3 months ago

@TheBrainScrambler could you test https://github.com/emmercm/igir/pull/1070 on your machine? It should at least prevent the EROFS error.

TheBrainScrambler commented 2 months ago

Testing v2.6.2, it seems to work, I get the cache file in ~/igir.cache

github-actions[bot] commented 4 weeks ago

:lock: Inactive issue lock

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Comment generated by the GitHub Lock Issues workflow.