Skip to content

Commit 6c82177

Browse files
committed
Work around .NET Core handling trailing slashes differently
1 parent eb6c84e commit 6c82177

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

LibGit2Sharp.Tests/RepositoryFixture.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ private static void CheckGitConfigFile(string dir)
167167

168168
private static void AssertIsHidden(string repoPath)
169169
{
170+
//Work around .NET Core handling calls to File.GetAttributes with paths with a trailing slash differently
171+
//without removing the trailing slash, the Hidden attribute is not included.
172+
repoPath = repoPath.TrimEnd('/');
173+
170174
FileAttributes attribs = File.GetAttributes(repoPath);
171175

172176
Assert.Equal(FileAttributes.Hidden, (attribs & FileAttributes.Hidden));

0 commit comments

Comments
 (0)