handle cross-device linking in windows

This commit is contained in:
Gokcehan committed 2020-07-04 00:16:16 +03:00
1 parent e2bf773f3b
commit bc2a80fd6e
3 files changed
+10 -2

No files matched your search

+5
View File
@@ -11,6 +11,7 @@ import (
"path/filepath"
"runtime"
"strings"
"syscall"
)
var (
@@ -161,6 +162,10 @@ func matchPattern(pattern, name, path string) bool {
return matched
}
func errCrossDevice(err error) bool {
return err.(*os.LinkError).Err.(syscall.Errno) == syscall.EXDEV
}
func exportFiles(f string, fs []string) {
envFile := f
envFiles := strings.Join(fs, gOpts.filesep)