Browse Source

Use verbose delete for extension uninstall

pull/438/head
ionite34 10 months ago
parent
commit
9da30935f1
No known key found for this signature in database
GPG Key ID: B3404C5F3827849B
  1. 9
      .backportrc.json
  2. 12
      StabilityMatrix.Core/Models/Packages/Extensions/GitPackageExtensionManager.cs

9
.backportrc.json

@ -0,0 +1,9 @@
{
"repoOwner": "ionite34",
"repoName": "StabilityMatrix",
"branches": ["main"],
"targetBranchChoices": ["dev"],
"fork": false,
"targetPRLabels": ["backport"],
"prTitle": "[{{sourceBranch}} to {{targetBranch}}] backport: {{sourcePullRequest.title}} ({{sourcePullRequest.number}})"
}

12
StabilityMatrix.Core/Models/Packages/Extensions/GitPackageExtensionManager.cs

@ -1,5 +1,6 @@
using KGySoft.CoreLibraries;
using NLog;
using StabilityMatrix.Core.Extensions;
using StabilityMatrix.Core.Helper;
using StabilityMatrix.Core.Models.FileInterfaces;
using StabilityMatrix.Core.Models.Progress;
@ -216,7 +217,16 @@ public abstract class GitPackageExtensionManager(IPrerequisiteHelper prerequisit
{
cancellationToken.ThrowIfCancellationRequested();
await path.DeleteAsync().ConfigureAwait(false);
if (path is DirectoryPath directoryPath)
{
await directoryPath
.DeleteVerboseAsync(cancellationToken: cancellationToken)
.ConfigureAwait(false);
}
else
{
await path.DeleteAsync().ConfigureAwait(false);
}
}
}
}

Loading…
Cancel
Save