Skip to content

Commit 72276e6

Browse files
committed
Fixed search output on MacOS and Linux.
1 parent aed7d98 commit 72276e6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

VisualStudioSolutionSecrets/Commands/SearchCommand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.IO;
23
using System.Threading.Tasks;
34
using McMaster.Extensions.CommandLineUtils;
45
using VisualStudioSolutionSecrets.Commands.Abstractions;
@@ -55,7 +56,7 @@ public int OnExecute()
5556
string projectRelativePath = String.Empty;
5657
string projectName = projectFileName;
5758

58-
int separator = projectFileName.LastIndexOf("\\", StringComparison.Ordinal);
59+
int separator = projectFileName.LastIndexOf(System.IO.Path.DirectorySeparatorChar);
5960
if (separator > 0)
6061
{
6162
projectRelativePath = projectFileName.Substring(0, separator + 1);

0 commit comments

Comments
 (0)