Skip to content

Commit

Permalink
fix Bug 73382
Browse files Browse the repository at this point in the history
  • Loading branch information
SuhorukovAnton committed Mar 3, 2025
1 parent 02c4c04 commit 13f5551
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ public async Task<Item> CreateFileAsync(Stream fileStream, string title, string
{
return null;
}

var path = $"{parent.ParentReference.Path.Replace(RootPath, string.Empty)}/{parent.Name}/{title}";
var parentPath = parent.ParentReference.Path == null ? "" : parent.ParentReference.Path.Replace(RootPath, string.Empty) + $"/{parent.Name}";
var path = $"{parentPath}/{title}";

return await OnedriveClient.Drive.Root.ItemWithPath(path)
.Content.Request().PutAsync<Item>(fileStream);
Expand Down

0 comments on commit 13f5551

Please sign in to comment.