github.com/rclone/rclone@v1.66.1-0.20240517100346-7b89735ae726/backend/local/symlink_other.go (about)

     1  //go:build windows || plan9 || js
     2  
     3  package local
     4  
     5  import (
     6  	"strings"
     7  )
     8  
     9  // isCircularSymlinkError checks if the current error code is because of a circular symlink
    10  func isCircularSymlinkError(err error) bool {
    11  	if err != nil {
    12  		if strings.Contains(err.Error(), "The name of the file cannot be resolved by the system") {
    13  			return true
    14  		}
    15  	}
    16  	return false
    17  }