From eef50d5f2cf4fc7ee8924304acd33bbbddcb728f Mon Sep 17 00:00:00 2001 From: = <=> Date: Tue, 26 Nov 2024 16:19:46 -0700 Subject: [PATCH] more path debugging --- fclauncher/InstanceManager.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fclauncher/InstanceManager.go b/fclauncher/InstanceManager.go index 56e1ce7..e645825 100644 --- a/fclauncher/InstanceManager.go +++ b/fclauncher/InstanceManager.go @@ -353,7 +353,8 @@ common: pkg := tokens[len(tokens)-2] instanceObject.Libraries = append(instanceObject.Libraries, filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name))) for ind, path := range instanceObject.Libraries { - tokens := strings.Split(path, "/") + tokens := strings.Split(path, string(os.PathSeparator)) + fmt.Printf("Inspecing path %s with %d tokens", path, len(tokens)) if pkg == tokens[len(tokens)-3] { instanceObject.Libraries[ind] = filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name)) fmt.Printf("duplicate library %s\n", pkg) @@ -411,7 +412,7 @@ common: pkg := tokens[len(tokens)-2] instanceObject.Libraries = append(instanceObject.Libraries, filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name))) for ind, path := range instanceObject.Libraries { - tokens := strings.Split(path, "/") + tokens := strings.Split(path, string(os.PathSeparator)) if pkg == tokens[len(tokens)-3] { instanceObject.Libraries[ind] = filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name)) fmt.Printf("duplicate library %s\n", pkg)