Skip to content

Commit 21df4b0

Browse files
Fix path format.
1 parent f66301e commit 21df4b0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/Cli4Fody/Arguments/TargetPath.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ private TargetPath(string value)
1010
{
1111
if (!Path.IsPathRooted(value))
1212
{
13-
value = Path.Combine(System.IO.Directory.GetCurrentDirectory(), value);
13+
value = Path.Combine(System.IO.Directory.GetCurrentDirectory(), NativePath(value));
1414
}
1515
Value = value;
1616
Directory = Path.GetDirectoryName(value)!;
@@ -43,7 +43,7 @@ public string[] GetProjectPaths()
4343
var solutionContent = File.ReadAllText(Value);
4444
var matches = ProjectMatcher().Matches(solutionContent);
4545

46-
_projectPaths = matches.Select(x => Path.Combine(Directory, x.Groups[1].Value)).ToArray();
46+
_projectPaths = matches.Select(x => Path.Combine(Directory, NativePath(x.Groups[1].Value))).ToArray();
4747
}
4848
}
4949

@@ -57,6 +57,8 @@ public static TargetPath Parse(string targetPath)
5757
return new(targetPath);
5858
}
5959

60+
private static string NativePath(string path) => path.Replace('\\', Path.DirectorySeparatorChar);
61+
6062
[GeneratedRegex(@"Project\("".*""\) = "".*"", ""([^""]+\.csproj)""")]
6163
private static partial Regex ProjectMatcher();
6264
}

src/Cli4Fody/Cli4Fody.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<TargetFramework>net8.0</TargetFramework>
6-
<VersionPrefix>1.0.0</VersionPrefix>
6+
<VersionPrefix>1.0.1</VersionPrefix>
77
<Authors>ihourglass</Authors>
88
<ImplicitUsings>enable</ImplicitUsings>
99
<Nullable>enable</Nullable>

0 commit comments

Comments
 (0)