KoenZomers / OneDriveAPI

API in .NET Framework 4.8.0, .NET Core 3.1 and .NET 6.0 to communicate with OneDrive Personal and OneDrive for Business
Eclipse Public License 1.0
109 stars 34 forks source link

Bug in DownloadItemAndSaveAs(string path, ...) #2

Closed Kyrodan closed 8 years ago

Kyrodan commented 8 years ago

Bug: using DownloadItem is wrong, DownloadItemInternal would right. By the way: the other overloaded method is correct.

/// <summary>
/// Downloads the contents of the item on OneDrive at the provided path to the full path provided
/// </summary>
/// <param name="path">Path to an item on OneDrive to download its contents of</param>
/// <param name="saveAs">Full path including filename where to store the downloaded file</param>
/// <returns>True if download was successful, false if it failed</returns>
public async Task<bool> DownloadItemAndSaveAs(string path, string saveAs)
{
    var oneDriveItem = await GetItem(path);
    return await DownloadItem(oneDriveItem, saveAs);
}
KoenZomers commented 8 years ago

Well noticed. I've fixed this bug.