Repository navigation
[Feature] option to enforce shell-safe storage paths #33356
Closed
mivanit
started this conversation in
Feature Request
Replies: 1 comment 4 replies
|
This doesn't really seem like Immich's job to me, and afaik paths like that work fine in shells, you just need to quote them? |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have searched the existing feature requests, both open and closed, to make sure this is not a duplicate request.
The feature
The storage template, which builds paths from
{{filename}},{{album}}, etc, can produce paths with spaces, "&", arbitrary unicode, and other characters which are not shell-safe. Renaming the files on disk breaks things. It would be very nice to be able to enable some kind of option to use only shell-safe characters in paths (i.e. alphanumeric, "-", "_").As I see it there are 3 options:
{{albumAscii}}which is{{album}}but sanitized{{ascii album}}Personally, option 3 feels cleanest to me, but I understand that adding custom helpers is something the maintainers would like to avoid (see #18060, although I believe a single string transform helper is simpler than that proposal)
Importantly, any of the above options would be opt-in and preserve existing behavior unless the user explicitly changes some settings. Happy to write up a PR of any of the options, and open to suggestions for other alternatives.
Related:
Platform
All reactions