Skip to content

Commit

Permalink
Merge pull request #96 from geniass/master
Browse files Browse the repository at this point in the history
list: traverse nested dir symlinks
  • Loading branch information
Emmanuel Odeke committed Mar 12, 2015
2 parents 7f7dea5 + b41f959 commit 1b3779a
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,13 +410,12 @@ func list(context *config.Context, p string, hidden bool, ignore *regexp.Regexp)

symlink := (file.Mode() & os.ModeSymlink) != 0
if symlink {
fChan, cErr := list(context, gopath.Join(p, file.Name()), hidden, ignore)
if cErr != nil {
continue
}
for child := range fChan {
fileChan <- child
}
symAbsPath := gopath.Join(absPath, file.Name())
var symInfo string
symInfo, err = filepath.EvalSymlinks(symAbsPath)
var symFile os.FileInfo
symFile, err = os.Stat(symInfo)
fileChan <- NewLocalFile(symAbsPath, symFile)
}
}
close(fileChan)
Expand Down

0 comments on commit 1b3779a

Please sign in to comment.