Skip to content

Commit

Permalink
fix error code import
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxkad committed Mar 3, 2024
1 parent d06fd01 commit 8b5cf61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions go.mod
Expand Up @@ -2,9 +2,9 @@ module github.com/kmcsr/server-installer

go 1.20

require github.com/kmcsr/go-logger v1.2.1

require (
github.com/sirupsen/logrus v1.9.2 // indirect
golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 // indirect
github.com/kmcsr/go-logger v1.2.1
golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8
)

require github.com/sirupsen/logrus v1.9.2 // indirect
4 changes: 3 additions & 1 deletion rename_windows.go
Expand Up @@ -5,12 +5,14 @@ package installer
import (
"errors"
"syscall"

"golang.org/x/sys/windows"
)

func crossDevice(err error) bool {
var sysErr syscall.Errno
if errors.As(err, &sysErr) {
return err == syscall.EXDEV || err == syscall.ERROR_NOT_SAME_DEVICE
return err == syscall.EXDEV || err == windows.ERROR_NOT_SAME_DEVICE
}
return false
}

0 comments on commit 8b5cf61

Please sign in to comment.