Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions core/services/onedrive/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,10 @@ impl OneDriveCore {
path: &str,
args: &OpWrite,
) -> Result<Response<Buffer>> {
let parent_path = get_parent(path);
let file_name = get_basename(path);
let url = format!(
"{}:/createUploadSession",
self.onedrive_item_url(parent_path, true),
self.onedrive_item_url(path, true),
);
Comment on lines 385 to 389
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

Consider adding a regression unit test for onedrive_create_upload_session URL construction to ensure the generated endpoint includes the full file path (including filename) and stays consistent with the item.name sent in the request body. This would prevent reintroducing the previous 400 "Name from path does not match name from body" behavior when refactoring URL helpers.

Copilot uses AI. Check for mistakes.
let mut request = Request::post(url).header(header::CONTENT_TYPE, "application/json");

Expand Down
Loading