From 73b6a8c60fce35792ba595f41cf049b958ee02b3 Mon Sep 17 00:00:00 2001 From: Daniel Peinhopf <84123899+sevensolutions@users.noreply.github.com> Date: Sun, 15 Sep 2024 10:07:52 +0200 Subject: [PATCH] Fix DeleteFileAsync of Management API. --- src/NomadIIS/Services/IisTaskHandle.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NomadIIS/Services/IisTaskHandle.cs b/src/NomadIIS/Services/IisTaskHandle.cs index 0a21ce7..905eb4f 100644 --- a/src/NomadIIS/Services/IisTaskHandle.cs +++ b/src/NomadIIS/Services/IisTaskHandle.cs @@ -1035,9 +1035,9 @@ public Task DeleteFileAsync ( string path ) if ( path.EndsWith( "/*" ) || path.EndsWith( "/*.*" ) ) { if ( path.EndsWith( "/*" ) ) - path = path[..2]; + path = path[..^2]; else - path = path[..4]; + path = path[..^4]; physicalPath = Path.Combine( _taskConfig.AllocDir, _taskConfig.Name, path ); FileSystemHelper.CleanFolder( physicalPath );