MegaApiClient
MegaApiClient copied to clipboard
Erro DeleteAsync
I'm trying to delete a file or folder and it's giving me the following error "System.ArgumentNullException: 'Value cannot be null. Arg_ParamName_Name'"
But this is OK, it's just a test and the variable "oo" IS NOT NULL but it gives the same error.
I'm using version 1.10.4
Here is just a test
IEnumerable<INode> nodes2 = await MClient.GetNodesFromLinkAsync(new Uri("https://mega.nz/folder/CgwjRapBeyNl10emvGN9H-9tg"));
ListStatus.Items.Clear();
INode oo = null;
foreach (var item in nodes2)
{
if (item.Type == NodeType.Directory)
{
oo = item;
break;
}
}
Progress<double> PProgresso = null;
PProgresso = new Progress<double>(p => ProgressBar.Value = Convert.ToInt32(p));
PProgresso.ProgressChanged += PProgresso_ProgressChanged;
await MClient.DownloadFileAsync(oo, $"C:\\TEMP\\{oo.Name}", PProgresso);
await MClient.DeleteAsync(oo);
await MClient.LogoutAsync();