Skip to content

Commit

Permalink
add option to handle errors
Browse files Browse the repository at this point in the history
  • Loading branch information
michalpristas committed Apr 3, 2023
1 parent cf98ac5 commit a731943
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func Copy(src, dest string, opts ...Options) error {
opt := assureOptions(src, dest, opts...)
info, err := os.Lstat(src)
if err != nil {
return onError(err, opt) // called both, we don't know if it's a file or directory
return onError(err, opt)
}
return switchboard(src, dest, info, opt)
}
Expand Down

0 comments on commit a731943

Please sign in to comment.