MegaApiClient icon indicating copy to clipboard operation
MegaApiClient copied to clipboard

Erro DeleteAsync

Open CrisRogoy opened this issue 8 months ago • 1 comments

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();

CrisRogoy avatar Jun 13 '24 19:06 CrisRogoy