mirror of
https://github.com/actions/runner.git
synced 2025-12-12 14:17:46 +00:00
Fix logic for trimming manifestfile path
This commit is contained in:
@@ -61,7 +61,7 @@ namespace GitHub.Runner.Worker
|
|||||||
// we can just remove the # of characters from the fileName according to the length of the basePath
|
// we can just remove the # of characters from the fileName according to the length of the basePath
|
||||||
string basePath = HostContext.GetDirectory(WellKnownDirectory.Actions);
|
string basePath = HostContext.GetDirectory(WellKnownDirectory.Actions);
|
||||||
string fileRelativePath = manifestFile;
|
string fileRelativePath = manifestFile;
|
||||||
if (manifestFile.Length > basePath.Length + 1)
|
if (manifestFile.Contains(basePath))
|
||||||
{
|
{
|
||||||
fileRelativePath = manifestFile.Remove(0, basePath.Length + 1);
|
fileRelativePath = manifestFile.Remove(0, basePath.Length + 1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user