From a28999f92f215bdf9e90d62bb82d00de6f44d223 Mon Sep 17 00:00:00 2001 From: BuyMyMojo Date: Wed, 21 Sep 2022 23:39:37 +1000 Subject: [PATCH] Change input path handling Update input path to fix weird windows issues for a user. --- User ID Parser/IdParser.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/User ID Parser/IdParser.go b/User ID Parser/IdParser.go index 912ae3c..7ced6f7 100644 --- a/User ID Parser/IdParser.go +++ b/User ID Parser/IdParser.go @@ -61,9 +61,17 @@ 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 {