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,9 +61,17 @@ func main() {
|
||||||
// For each file in folder
|
// For each file in folder
|
||||||
for _, file := range files {
|
for _, file := range files {
|
||||||
if !file.IsDir() {
|
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 {
|
} else {
|
||||||
|
|
Reference in a new issue