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

Fix user and user_path in FSNode for subpath deployments #297

Merged
merged 5 commits into from
Sep 17, 2024

Conversation

vwbusguy
Copy link
Contributor

Fixes #296 .

Changes proposed in this pull request:

  • Regex instantiated on import for performance
  • Regex to fetch accurate user path regardless of subpath
  • Regex to fetch accurate user regardless of subpath

Tested against three Nextcloud instances, with or without /nextcloud and index.php in the path.

@vwbusguy
Copy link
Contributor Author

The tests don't lie. My comment had the correct regex but my original PR commit didn't. Fix incoming.

@vwbusguy
Copy link
Contributor Author

I think I've found a fix for the test regressions but it appears to be awaiting approval to run the tests against the most recent commit.

Signed-off-by: Scott Williams <[email protected]>
Copy link

codecov bot commented Sep 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.81%. Comparing base (aef1ed2) to head (986fa1f).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #297   +/-   ##
=======================================
  Coverage   94.81%   94.81%           
=======================================
  Files          46       46           
  Lines        5341     5346    +5     
=======================================
+ Hits         5064     5069    +5     
  Misses        277      277           
Files with missing lines Coverage Δ
nc_py_api/files/__init__.py 99.69% <100.00%> (+<0.01%) ⬆️

Copy link
Contributor

@bigcat88 bigcat88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me.
Thank you very much for the pull request.

@bigcat88 bigcat88 merged commit de9f660 into cloud-py-api:main Sep 17, 2024
19 checks passed
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.

Files FSNode user is not correctly scraped if Nextcloud is hosted in a sub-path
2 participants