2021-09-09 12:25:25 +00:00
|
|
|
//go:build windows || plan9 || js
|
2020-11-12 11:32:55 +00:00
|
|
|
// +build windows plan9 js
|
|
|
|
|
|
|
|
package local
|
|
|
|
|
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
)
|
|
|
|
|
|
|
|
// isCircularSymlinkError checks if the current error code is because of a circular symlink
|
|
|
|
func isCircularSymlinkError(err error) bool {
|
|
|
|
if err != nil {
|
|
|
|
if strings.Contains(err.Error(), "The name of the file cannot be resolved by the system") {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|