Change input path handling
Update input path to fix weird windows issues for a user.
This commit is contained in:
parent
b3f48957b1
commit
a28999f92f
1 changed files with 10 additions and 2 deletions
|
@ -61,10 +61,18 @@ func main() {
|
|||
// For each file in folder
|
||||
for _, file := range files {
|
||||
if !file.IsDir() {
|
||||
process(CsvInput + file.Name())
|
||||
// file is not a directory so process it's full path
|
||||
// check if windows or linux
|
||||
if strings.Contains(CsvInput, "\\") {
|
||||
// windows
|
||||
process(CsvInput + "\\" + file.Name())
|
||||
} else {
|
||||
// linux
|
||||
process(CsvInput + "/" + file.Name())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
// file is not a directory
|
||||
|
|
Reference in a new issue