Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Nov 19, 2019
1 parent dcf8c67 commit 529f9af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
12 changes: 2 additions & 10 deletions copier_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,12 @@ import (
// IsSameFile returns true if the two given paths refer to the same file.
func (c *Copier) IsSameFile(file1, file2 string) bool {
fi1, err := os.Stat(file1)

switch {
case os.IsNotExist(err):
return false
case err != nil:
if err != nil {
return false
}

fi2, err := os.Stat(file2)

switch {
case os.IsNotExist(err):
return false
case err != nil:
if err != nil {
return false
}

Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module github.com/peterebden/go-copyfile

go 1.14

require github.com/stretchr/testify v1.3.0

0 comments on commit 529f9af

Please sign in to comment.