fix: read directory paths from settings.json instead of hardcoding#319
fix: read directory paths from settings.json instead of hardcoding#319lexfrei wants to merge 1 commit intolinuxserver:masterfrom
Conversation
The init script previously hardcoded /downloads/complete and /downloads/incomplete for ownership checks, causing errors when users configure different paths in settings.json. Now reads download-dir, incomplete-dir, and watch-dir from settings.json, and only checks ownership when the corresponding feature is enabled (incomplete-dir-enabled, watch-dir-enabled). jq is already a dependency used earlier in the same script. Closes linuxserver#34, closes linuxserver#164 Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
There was a problem hiding this comment.
Thanks for opening this pull request! Be sure to follow the pull request template!
|
I am a bot, here are the test results for this PR:
|
|
This is a design decision we made. We don't have plans to change it. |
|
I am a bot, here are the test results for this PR:
|
Description:
The init script reads
download-dir,incomplete-dir, andwatch-dirfromsettings.jsonusingjq(already a dependency in the same script) instead of hardcoding/downloads/completeand/downloads/incomplete.Ownership checks for
incomplete-dirandwatch-dirare now conditional on their respective*-enabledflags insettings.json.Falls back to default paths (
/downloads,/downloads/incomplete,/watch) whensettings.jsondoes not exist yet (first start).Benefits of this PR and context:
The current init script hardcodes
/downloads/completeand/downloads/incompletepaths for ownership checks. When users configure different paths insettings.json(or disable these features entirely), the script producesstat: cannot statxerrors on every container start.This change respects user configuration while preserving the original ownership-fixing behavior for users who keep the default paths.
Closes #34, closes #164
How Has This Been Tested?
settings.json(default paths) — ownership set correctlyincomplete-dir-enabled: falseand nocomplete/incompletedirectories — no errorsdownload-dirpath — ownership set on the correct directorysettings.json(first run) — falls back to default pathsSource / References:
/downloaddirectory