Compare commits
1 commit
main
...
lunny/igno
Author | SHA1 | Date | |
---|---|---|---|
|
d3bedf74f5 |
1 changed files with 4 additions and 1 deletions
5
main.go
5
main.go
|
@ -110,7 +110,10 @@ func getFiles(parentDir, files string) ([]string, error) {
|
|||
lines := strings.Split(files, "\n")
|
||||
for _, line := range lines {
|
||||
line = strings.Trim(line, "'")
|
||||
line = strings.Trim(line, `"`)
|
||||
line = strings.TrimSpace(strings.Trim(line, `"`))
|
||||
if line == "" {
|
||||
continue
|
||||
}
|
||||
if filepath.IsAbs(line) {
|
||||
return nil, fmt.Errorf("file path %s is absolute", line)
|
||||
}
|
||||
|
|
Reference in a new issue