Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for symlinks prior to counting file as a hardlink #609

Merged
merged 4 commits into from
Jul 19, 2024

Conversation

glicholas
Copy link
Contributor

@glicholas glicholas commented Jul 18, 2024

Description

When counting existing hardlinks of a file to determine if all contributing hardlinks are within the root_dir (which won't count), get_inode_count was also counting symlinks towards the total count. This now skips symlinks so they do not count.

Fixes # (608)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the docstring for new or existing methods
  • I have modified this PR to merge to the develop branch

@bakerboy448 bakerboy448 requested a review from bobokun July 18, 2024 02:24
modules/util.py Outdated Show resolved Hide resolved
@bobokun bobokun changed the base branch from master to develop July 18, 2024 19:34
@bobokun bobokun merged commit d8ec093 into StuffAnThings:develop Jul 19, 2024
2 of 3 checks passed
bobokun added a commit that referenced this pull request Sep 6, 2024
* 4.1.8-develop1

* Bump humanize from 4.9.0 to 4.10.0 (#603)

Bumps [humanize](https://github.com/python-humanize/humanize) from 4.9.0 to 4.10.0.
- [Release notes](https://github.com/python-humanize/humanize/releases)
- [Commits](python-humanize/humanize@4.9.0...4.10.0)

---
updated-dependencies:
- dependency-name: humanize
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Print the schedule and delay before starting the sleep (#606)

* Bump croniter from 2.0.5 to 2.0.7 (#607)

Bumps [croniter](https://github.com/kiorky/croniter) from 2.0.5 to 2.0.7.
- [Changelog](https://github.com/kiorky/croniter/blob/master/CHANGELOG.rst)
- [Commits](kiorky/croniter@2.0.5...2.0.7)

---
updated-dependencies:
- dependency-name: croniter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump qbittorrent-api from 2024.5.63 to 2024.7.64 (#611)

Bumps [qbittorrent-api](https://github.com/rmartin16/qbittorrent-api) from 2024.5.63 to 2024.7.64.
- [Release notes](https://github.com/rmartin16/qbittorrent-api/releases)
- [Changelog](https://github.com/rmartin16/qbittorrent-api/blob/main/CHANGELOG.md)
- [Commits](rmartin16/qbittorrent-api@v2024.5.63...v2024.7.64)

---
updated-dependencies:
- dependency-name: qbittorrent-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Check for symlinks prior to counting file as a hardlink (#609)

* Bump croniter from 2.0.7 to 3.0.1 (#617)

* Update SUPPORTED_VERSIONS.json (#618)

* Update SUPPORTED_VERSIONS.json (#612)

Co-authored-by: bobokun <[email protected]>

* Bump croniter from 3.0.1 to 3.0.3 (#621)

Bumps [croniter](https://github.com/kiorky/croniter) from 3.0.1 to 3.0.3.
- [Changelog](https://github.com/kiorky/croniter/blob/master/CHANGELOG.rst)
- [Commits](kiorky/croniter@3.0.1...3.0.3)

---
updated-dependencies:
- dependency-name: croniter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump pre-commit from 3.7.1 to 3.8.0 (#620)

Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 3.7.1 to 3.8.0.
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md)
- [Commits](pre-commit/pre-commit@v3.7.1...v3.8.0)

---
updated-dependencies:
- dependency-name: pre-commit
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* docs: bump required python version to 3.9.0+ (#623)

* Typo fix in `  docs/Config-Setup.md` (#627)

* Typo fix in `config.yml.sample` (#626)

* Bump flake8 from 7.1.0 to 7.1.1 (#628)

Bumps [flake8](https://github.com/pycqa/flake8) from 7.1.0 to 7.1.1.
- [Commits](PyCQA/flake8@7.1.0...7.1.1)

---
updated-dependencies:
- dependency-name: flake8
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(docs): Sync wiki to docs [skip-cd]

* Bump qbittorrent-api from 2024.7.64 to 2024.8.65 (#637)

Bumps [qbittorrent-api](https://github.com/rmartin16/qbittorrent-api) from 2024.7.64 to 2024.8.65.
- [Release notes](https://github.com/rmartin16/qbittorrent-api/releases)
- [Changelog](https://github.com/rmartin16/qbittorrent-api/blob/main/CHANGELOG.md)
- [Commits](rmartin16/qbittorrent-api@v2024.7.64...v2024.8.65)

---
updated-dependencies:
- dependency-name: qbittorrent-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update SUPPORTED_VERSIONS.json (#639)

* Extend logging to explain why torrent files were not deleted. (#640)

* Extend logging to explain why torrent files were not deleted.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* update tox

* Add force_auto_tmm_ignore_tags feature (#634)

* Add force_auto_tmm_ignore_tags feature to qbittorrent module
This commit introduces a new configuration option 'force_auto_tmm_ignore_tags' that allows users to specify tags which will prevent the force_auto_tmm feature from being applied to that torrent.

Changes:

qbittorrent.py:
Modified the get_torrent_info method in the Qbt class
Added a check for matching tags to ignore when applying force_auto_tmm

config.py:
Added 'force_auto_tmm_ignore_tags' to the settings dictionary
Implemented check_for_attribute method call to load the new setting from config.yml

config.yml:
Added 'force_auto_tmm_ignore_tags' to the settings section
Included example tags 'cross-seed' and 'Upload' as default values to ignore

* remove extra spacing between lines.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix line length to adhere to flake8

* change log output for force_auto_tmm to multiline comment to adhere to flake8

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add comment explaining logic for ignoring force_auto_tmm using tags.

* Add force_auto_tmm_ignore_tags feature to qbittorrent module
This commit introduces a new configuration option 'force_auto_tmm_ignore_tags' that allows users to specify tags which will prevent the force_auto_tmm feature from being applied to that torrent.

Changes:

qbittorrent.py:
Modified the get_torrent_info method in the Qbt class
Added a check for matching tags to ignore when applying force_auto_tmm

config.py:
Added 'force_auto_tmm_ignore_tags' to the settings dictionary
Implemented check_for_attribute method call to load the new setting from config.yml

config.yml:
Added 'force_auto_tmm_ignore_tags' to the settings section
Included example tags 'cross-seed' and 'Upload' as default values to ignore

remove extra spacing between lines.

fix line length to adhere to flake8

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

change log output for force_auto_tmm to multiline comment to adhere to flake8

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Add comment explaining logic for ignoring force_auto_tmm using tags.

* fixed text formatting so its displayed properly when script is run

* remove f-string

---------

Co-authored-by: TJZine <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: bobokun <[email protected]>

* Bump peter-evans/create-pull-request from 6 to 7 (#642)

Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 6 to 7.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](peter-evans/create-pull-request@v6...v7)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* 4.1.8

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: bobokun <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ineednewpajamas <[email protected]>
Co-authored-by: Nicholas Sereni <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: bobokun <[email protected]>
Co-authored-by: James Tufarelli <[email protected]>
Co-authored-by: Actionbot <[email protected]>
Co-authored-by: darkeclipse <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tristan Zine <[email protected]>
Co-authored-by: TJZine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants