-
Notifications
You must be signed in to change notification settings - Fork 195
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
GetFolderByServerRelativeUrlAsync not working anymore with path from System.IO.Path [regression?] #1412
Comments
@FlorianLabranche : assume there's no difference in casing between testing with 1.11 and 1.12? |
No difference. |
@FlorianLabranche : can you do a Fiddler trace and compare both GET requests, spotting the difference there will help identify the root cause. Also, does it fail on Linux, on Windows or both? |
@FlorianLabranche : looking at the code this is the most recent change here, would not expect this to result in what you see... |
@FlorianLabranche : does it also happen with sites that do not have an _ in their name? |
@FlorianLabranche : any updates here? |
@jansenbe here are the results of my tests :
The encoded path is the same, so '\' is not an issue. Targeting sites with or without _ in their url has no impact. Issue seems to come from the change you shared. |
@FlorianLabranche : interesting, tested this and so it seems that using the "parameter" model requires the server relative path to use / while the previous one worked with either / and . I'll update the code to handle that automatically |
It's weird they behave differently, indeed. |
…l` can handle \ as path separator #1412
@FlorianLabranche : pushed an update, thanks for raising this one :-) Closing issue now, please re-open if things don't seem to work |
Category
Describe the bug
Retrieving folder from path handled using System.IO.Path was working fine in PnP.Core 1.10
When upgrading SDK to 1.12, the same code returns a 404 'File Not Found.' exception.
Steps to reproduce
Below code snippet returns an exception in SDK 1.11 and 1.12 but works fine in 1.10
This snippet is only to demonstrate the issue. In this case, to retrieve the folder, I would use
file.ListItemAllFields.GetParentFolderAsync()
.Expected behavior
I don't know if this should be handled by the library because the issue is related to the path being encoded by System.IO.Path.
Backslashes are escaped.
But as this was working in a previous release, I raise it as a bug.
Environment details (development & target environment)
Additional context
Code is working once deployed in a Linux Web App.
But path are handled differently in linux.
The text was updated successfully, but these errors were encountered: