-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
On Windows, do not degenerate working directory through restarts caus…
…ing command execution failure when APPDATA is a drive name-based path which maps to a UNC share
- Loading branch information
1 parent
57f9b20
commit 1ce3d7a
Showing
6 changed files
with
189 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package system | ||
|
||
type universalNameRetrievalErrorType int | ||
|
||
const errorBadDevice universalNameRetrievalErrorType = 1 | ||
const errorConnectionUnavailable universalNameRetrievalErrorType = 2 | ||
const errorExtendedError universalNameRetrievalErrorType = 3 | ||
const errorMoreData universalNameRetrievalErrorType = 4 | ||
const errorNotSupported universalNameRetrievalErrorType = 5 | ||
const errorNoNetOrBadPath universalNameRetrievalErrorType = 6 | ||
const errorNoNetwork universalNameRetrievalErrorType = 7 | ||
const errorNotConnected universalNameRetrievalErrorType = 8 | ||
const errorUndocumented universalNameRetrievalErrorType = 9 | ||
|
||
type universalNameRetrievalError struct { | ||
message string | ||
errorType universalNameRetrievalErrorType | ||
} | ||
|
||
func (err *universalNameRetrievalError) Error() string { | ||
if err == nil { | ||
return "<nil>" | ||
} | ||
return err.message | ||
} | ||
|
||
// ErrorType returns the corresponsing WINAPI error type of the WNetGetUniversalNameW function call which generated the error. | ||
func (err *universalNameRetrievalError) ErrorType() universalNameRetrievalErrorType { | ||
return err.errorType | ||
} |