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
Here we access the path property of currentDirectoryURL and then attempt to convert this to filesystem representation. That might end up having a leading slash in it -- should this directly use currentDirectoryURL.withUnsafeFileSystemRepresentation instead?
The text was updated successfully, but these errors were encountered:
The FileManager.default._fileSystemRepresentation(withPath: workingDirectory) below this line should remove any leading slash because it will eventually call down into NSString._getFileSystemRepresentation which will remove the leading slash:
So I guess it's likely trimming the leading slash properly, but it seems like it may be incorrectly trimming trailing slashes based on the observed behavior.
On Windows, there is an important distinction between C:\ and C: -- the former is an absolute path which refers exactly to what it says, while the latter is actually a relative path which refers to "the current working directly of the specified drive", in my case, C:\Users\jakepetroules.
If I say that I want the working directory of C:\, Process must not alter that input prior to passing to CreateProcessW.
See https://github.com/apple/swift-corelibs-foundation/blob/951f3532bdb9605ea487e919fff853f69d26fffd/Sources/Foundation/Process.swift#L664
Here we access the path property of currentDirectoryURL and then attempt to convert this to filesystem representation. That might end up having a leading slash in it -- should this directly use currentDirectoryURL.withUnsafeFileSystemRepresentation instead?
The text was updated successfully, but these errors were encountered: