linuxserver / docker-transmission

GNU General Public License v3.0
595 stars 185 forks source link

Default directories are created only if needed #197

Closed hacketiwack closed 2 years ago

hacketiwack commented 2 years ago

linuxserver.io



Description:

The objective of this change is to avoid the creation of the different default directories: for downloads, incomplete downloads, and the watch folder. Indeed, even if the user has defined their directories, the default ones are annoyingly always created.

Benefits of this PR and context:

This change checks if there is already an existing /config/settings.json file and if yes, uses the configured directories. If there are no directories configured, then values for the directories defined in /defaults/settings.json are taken.

Moreover, the file has been simplified to be more readable and using the jq command (which is installed anyway) instead of less safe sed replacements.

How Has This Been Tested?

Built with my own CI/CD pipeline on Azure DevOps and deployed on my test rig.

Source / References:

LinuxServer-CI commented 2 years ago

I am a bot, here are the test results for this PR: https://ci-tests.linuxserver.io/lspipepr/transmission/3.00-r5-pkg-28b299a6-pr-197/index.html https://ci-tests.linuxserver.io/lspipepr/transmission/3.00-r5-pkg-28b299a6-pr-197/shellcheck-result.xml

LinuxServer-CI commented 2 years ago

I am a bot, here are the test results for this PR: https://ci-tests.linuxserver.io/lspipepr/transmission/3.00-r5-pkg-adaaf183-pr-197/index.html https://ci-tests.linuxserver.io/lspipepr/transmission/3.00-r5-pkg-adaaf183-pr-197/shellcheck-result.xml

hacketiwack commented 2 years ago

Solves this issue.

github-actions[bot] commented 2 years ago

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

hacketiwack commented 2 years ago

Is there still someone maintaining this repository?

github-actions[bot] commented 2 years ago

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

hacketiwack commented 2 years ago

Is this repository still active?

tan-wei commented 2 years ago

Humm, inactive?

hacketiwack commented 2 years ago

Humm, inactive?

It seems so... There's no news whatsoever...

aptalca commented 2 years ago

I'll be honest. I'm not touching this PR because:

  1. It combines two separate things: handling of download folders and switching sed to jq
  2. I don't view the creation of download folders as an issue that needs a solution
  3. Switching sed to jq seems to be merely cosmetic and doesn't add real benefit, but adds risk due to potential issues with the code, and increases maintenance burden if the maintainer is not that familiar with jq
hacketiwack commented 2 years ago

Thanks for the reply.

  1. OK. Acknowledged.
  2. It is not a big issue that the directories are created. It is just not so nice considering the user has a different configuration, the pre-defined directories are recreated at each relaunch of the container.
  3. OK, fair enough regarding the use of jq. It was simplifying things in my opinion. I will create a pull request that uses the sed.
github-actions[bot] commented 2 years ago

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

drizuid commented 2 years ago

closing this as we do not see a benefit to our userbase by accepting it. Users are free to use whatever folders they wish for downloads/incomplete. the existence of an empty directory does not preclude this.