Skip to content

Commit

Permalink
Merge branch 'azchohfi-workaround15' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
devlead committed Oct 26, 2019
2 parents 25b57e4 + a53de36 commit 66a7deb
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/Cake.LongPath.Module/LongPathDirectory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,22 @@ internal class LongPathDirectory : IDirectory
/// <value>The path.</value>
Path IFileSystemInfo.Path => Path;

public bool Exists => Directory.Exists;
public bool Exists
{
get
{
// Workaround until https://github.com/peteraritchie/LongPath/issues/82 is fixed
try
{
return Directory.Exists;
}
catch
{
return false;
}
}
}

public bool Hidden => (Directory.Attributes & FileAttributes.Hidden) == FileAttributes.Hidden;

/// <summary>
Expand Down

0 comments on commit 66a7deb

Please sign in to comment.