From 5433eeac54b4203d83991e02652f6eb8eba5adab Mon Sep 17 00:00:00 2001 From: Kejie Zhang <601172892@qq.com> Date: Wed, 5 Sep 2018 09:25:44 +0800 Subject: [PATCH] use file fullpath to judge file name License: MIT Signed-off-by: Kejie Zhang <601172892@qq.com> --- core/coreunix/add.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/coreunix/add.go b/core/coreunix/add.go index 3a89aa0c54d5..bf46b030b21f 100644 --- a/core/coreunix/add.go +++ b/core/coreunix/add.go @@ -472,7 +472,7 @@ func (adder *Adder) addFile(file files.File) error { } addFileName := file.FileName() - if addFileName == "" && adder.Name != "" { + if file.FullPath() == "" && adder.Name != ""{ addFileName = adder.Name adder.Name = "" }