Skip to content

Commit

Permalink
Fix uploading issue when src is an absolute path
Browse files Browse the repository at this point in the history
Fixed #109.
  • Loading branch information
RussellLuo committed Apr 27, 2017
1 parent c85974a commit e9dd567
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tar.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ func LocalTarCmdArgs(path, exclude string) []string {
// Added pattens to exclude from tar compress
excludes := strings.Split(exclude, ",")
for _, exclude := range excludes {
args = append(args, `--exclude=`+strings.TrimSpace(exclude))
trimmed := strings.TrimSpace(exclude)
if trimmed != "" {
args = append(args, `--exclude=`+trimmed)
}
}

args = append(args, "-C", ".", "-czf", "-", path)
Expand Down

0 comments on commit e9dd567

Please sign in to comment.