Fix blank line will upload all files
checks / check and test (push) Successful in 19m31s Details

This commit is contained in:
Lunny Xiao 2023-08-10 23:48:52 +08:00
parent 23a38ad334
commit d3bedf74f5
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 4 additions and 1 deletions

View File

@ -110,7 +110,10 @@ func getFiles(parentDir, files string) ([]string, error) {
lines := strings.Split(files, "\n") lines := strings.Split(files, "\n")
for _, line := range lines { for _, line := range lines {
line = strings.Trim(line, "'") line = strings.Trim(line, "'")
line = strings.Trim(line, `"`) line = strings.TrimSpace(strings.Trim(line, `"`))
if line == "" {
continue
}
if filepath.IsAbs(line) { if filepath.IsAbs(line) {
return nil, fmt.Errorf("file path %s is absolute", line) return nil, fmt.Errorf("file path %s is absolute", line)
} }