Merge pull request #2614 from djdv/windotdir

Fix dot path parsing on Windows
This commit is contained in:
Jeromy Johnson 2016-04-28 13:22:19 -07:00
commit e124ee23a3

View File

@ -405,8 +405,6 @@ const notRecursiveFmtStr = "'%s' is a directory, use the '-%s' flag to specify d
const dirNotSupportedFmtStr = "Invalid path '%s', argument '%s' does not support directories"
func appendFile(fpath string, argDef *cmds.Argument, recursive, hidden bool) (files.File, error) {
fpath = filepath.ToSlash(filepath.Clean(fpath))
if fpath == "." {
cwd, err := os.Getwd()
if err != nil {
@ -415,6 +413,8 @@ func appendFile(fpath string, argDef *cmds.Argument, recursive, hidden bool) (fi
fpath = cwd
}
fpath = filepath.ToSlash(filepath.Clean(fpath))
stat, err := os.Lstat(fpath)
if err != nil {
return nil, err