You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the path "./" or ".\" to retrieve a directory, an error stating that the path is not of a legal form is thrown by the .NET implementation.
#2647
Open
Meertman opened this issue
Oct 25, 2019
· 1 comment
When retrieving a directory from disk, using the following code
var directoryPath = new DirectoryPath("./"); (or new DirectoryPath(@"."))
var directory = context.FileSystem.GetDirectory(directoryPath);
the following error is thrown:
Error: System.ArgumentException: The path is not of a legal form.
at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.DirectoryInfo.Init(String path, Boolean checkHost)
at Cake.Core.IO.Directory..ctor(DirectoryPath path)
at Cake.Core.IO.FileSystem.GetDirectory(DirectoryPath path)
What is Expected?
The retrieval of the directory from disk.
What version of Cake are you using?
I've seen this error occur on 0.29 and 0.33
Are you running on a 32 or 64 bit system?
We are running a 64-bit system.
What environment are you running on? Windows? Linux? Mac?
We are running on Windows.
Are you running on a CI Server? If so, which one?
The issue occurs both on our build server (TeamCity), as well as on our local machines.
The text was updated successfully, but these errors were encountered:
What You Are Seeing?
When retrieving a directory from disk, using the following code
var directoryPath = new DirectoryPath("./"); (or new DirectoryPath(@"."))
var directory = context.FileSystem.GetDirectory(directoryPath);
the following error is thrown:
Error: System.ArgumentException: The path is not of a legal form.
at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.DirectoryInfo.Init(String path, Boolean checkHost)
at Cake.Core.IO.Directory..ctor(DirectoryPath path)
at Cake.Core.IO.FileSystem.GetDirectory(DirectoryPath path)
What is Expected?
The retrieval of the directory from disk.
What version of Cake are you using?
I've seen this error occur on 0.29 and 0.33
Are you running on a 32 or 64 bit system?
We are running a 64-bit system.
What environment are you running on? Windows? Linux? Mac?
We are running on Windows.
Are you running on a CI Server? If so, which one?
The issue occurs both on our build server (TeamCity), as well as on our local machines.
The text was updated successfully, but these errors were encountered: