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: Use relative paths to dav root #2417

Merged
merged 2 commits into from
Aug 13, 2024

Conversation

juliushaertl
Copy link
Member

@juliushaertl juliushaertl commented Aug 13, 2024

@susnux After #2392 and #2414 the filename attribute is still different from before. Before we used to have the relative path based on the user home or public share, how it actually includes the files/userId/ dav root.

My quick fix proposal would be to change the root that the dav client uses so the path it returns for filename is again relative to that root.

We could otherwise of course adjust apps that make use of that path, but I think the path relative to the root is more useful then the full dav path.

Before the refactor: /MyFolder/test.odt
After the refactor: /files/admin/MyFolder/test.odt
After this PR: /MyFolder/test.odt

Test CI runs for text, richdocuments:

@juliushaertl juliushaertl force-pushed the fix/filename-relative-to-davroot branch from fe29d2b to 1463c3f Compare August 13, 2024 07:38
@juliushaertl juliushaertl changed the base branch from master to fix/cypress August 13, 2024 07:39
@juliushaertl juliushaertl force-pushed the fix/filename-relative-to-davroot branch from 1463c3f to c2ec4ad Compare August 13, 2024 09:43
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliushaertl juliushaertl force-pushed the fix/filename-relative-to-davroot branch from c2ec4ad to 6912165 Compare August 13, 2024 09:54
@juliushaertl juliushaertl marked this pull request as ready for review August 13, 2024 10:06
Base automatically changed from fix/cypress to master August 13, 2024 10:07
@juliushaertl
Copy link
Member Author

/compile

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Copy link
Contributor

@susnux susnux left a comment

Choose a reason for hiding this comment

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

But you can pass the relative URL and it will get the root added?
Nevertheless if this is causing issues in text than lets do it for 30, as tomorrow we have RC1

@juliushaertl
Copy link
Member Author

But you can pass the relative URL and it will get the root added?

You mean when calling davGetClient ?

@juliushaertl juliushaertl added bug Something isn't working 3. to review Waiting for reviews labels Aug 13, 2024
@juliushaertl juliushaertl added this to the Nextcloud 30 milestone Aug 13, 2024
@juliushaertl juliushaertl merged commit 07bf880 into master Aug 13, 2024
29 of 31 checks passed
@juliushaertl juliushaertl deleted the fix/filename-relative-to-davroot branch August 13, 2024 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants