Skip to content

Commit

Permalink
symlink stat fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kcq committed Aug 2, 2017
1 parent 8e84299 commit ba2736c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/dirs.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func IsDir(target string) bool {

// IsRegularFile returns true if the target file system object is a regular file
func IsRegularFile(target string) bool {
info, err := os.Stat(target)
info, err := os.Lstat(target)
if err != nil {
return false
}
Expand All @@ -56,7 +56,7 @@ func IsRegularFile(target string) bool {

// IsSymlink returns true if the target file system object is a symlink
func IsSymlink(target string) bool {
info, err := os.Stat(target)
info, err := os.Lstat(target)
if err != nil {
return false
}
Expand All @@ -66,7 +66,7 @@ func IsSymlink(target string) bool {

// CopyFile copies the source file system object to the desired destination
func CopyFile(src, dst string, makeDir bool) error {
info, err := os.Stat(src)
info, err := os.Lstat(src)
if err != nil {
return err
}
Expand Down

0 comments on commit ba2736c

Please sign in to comment.