From af6e7ad9ea609c4d2bd4bf43341636a0ddbe9190 Mon Sep 17 00:00:00 2001 From: Dominic Della Valle Date: Thu, 28 Apr 2016 02:21:59 -0400 Subject: [PATCH] Fix dot path parsing on Windows License: MIT Signed-off-by: Dominic Della Valle --- commands/cli/parse.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/cli/parse.go b/commands/cli/parse.go index 2ac455f75..680fa466e 100644 --- a/commands/cli/parse.go +++ b/commands/cli/parse.go @@ -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