OneDrive / onedrive-sdk-csharp

OneDrive SDK for C#! https://dev.onedrive.com
Other
294 stars 143 forks source link

Access to file in root #125

Closed vasellivittorio closed 8 years ago

vasellivittorio commented 8 years ago

Hi i receive this exception when try to access to a file in root of my OneDrive:

`{Code: invalidRequest Throw site: 0f1c.0271 Message: Paths can only contain at most two colons

Inner error Code: badRequest Throw site: 0f1c.0271 }`

I am using this code: var item = await oneDriveClient .Drive .Root .ItemWithPath("/drive/root:/MyFile.txt") .Request() .GetAsync();

Joker8991 commented 8 years ago

var item = await oneDriveClient.Drive.Root.ItemWithPath("Myfile.txt").Request().GetAsync()

ginach commented 8 years ago

Correct, you'll only want to pass the Myfile.txt value to ItemWithPath. Drive.Root will add the /drive/root to the request and ItemWithPath will add the colons.