path separator weridness
This commit is contained in:
parent
6b07b95146
commit
20b8433d34
@ -335,11 +335,11 @@ func (i *InstanceManager) InstallFabric(instance string, fabricVersion string) {
|
|||||||
}
|
}
|
||||||
client:
|
client:
|
||||||
for _, lib := range metadata.LauncherMeta.Libraries.Client {
|
for _, lib := range metadata.LauncherMeta.Libraries.Client {
|
||||||
tokens := strings.Split(ProcessMavenPath(lib.Name), "/")
|
tokens := strings.Split(ProcessMavenPath(lib.Name), string(os.PathSeparator))
|
||||||
pkg := tokens[len(tokens)-2]
|
pkg := tokens[len(tokens)-2]
|
||||||
instanceObject.Libraries = append(instanceObject.Libraries, filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name)))
|
instanceObject.Libraries = append(instanceObject.Libraries, filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name)))
|
||||||
for ind, path := range instanceObject.Libraries {
|
for ind, path := range instanceObject.Libraries {
|
||||||
tokens := strings.Split(path, "/")
|
tokens := strings.Split(path, string(os.PathSeparator))
|
||||||
if pkg == tokens[len(tokens)-3] {
|
if pkg == tokens[len(tokens)-3] {
|
||||||
instanceObject.Libraries[ind] = filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name))
|
instanceObject.Libraries[ind] = filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name))
|
||||||
fmt.Printf("duplicate library %s\n", pkg)
|
fmt.Printf("duplicate library %s\n", pkg)
|
||||||
@ -349,12 +349,11 @@ client:
|
|||||||
}
|
}
|
||||||
common:
|
common:
|
||||||
for _, lib := range metadata.LauncherMeta.Libraries.Common {
|
for _, lib := range metadata.LauncherMeta.Libraries.Common {
|
||||||
tokens := strings.Split(ProcessMavenPath(lib.Name), "/")
|
tokens := strings.Split(ProcessMavenPath(lib.Name), string(os.PathSeparator))
|
||||||
fmt.Printf("Formating lib %s to path %s\n", lib.Name, ProcessMavenPath(lib.Name))
|
|
||||||
pkg := tokens[len(tokens)-2]
|
pkg := tokens[len(tokens)-2]
|
||||||
instanceObject.Libraries = append(instanceObject.Libraries, filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name)))
|
instanceObject.Libraries = append(instanceObject.Libraries, filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name)))
|
||||||
for ind, path := range instanceObject.Libraries {
|
for ind, path := range instanceObject.Libraries {
|
||||||
tokens := strings.Split(path, "/")
|
tokens := strings.Split(path, string(os.PathSeparator))
|
||||||
if pkg == tokens[len(tokens)-3] {
|
if pkg == tokens[len(tokens)-3] {
|
||||||
instanceObject.Libraries[ind] = filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name))
|
instanceObject.Libraries[ind] = filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name))
|
||||||
fmt.Printf("duplicate library %s\n", pkg)
|
fmt.Printf("duplicate library %s\n", pkg)
|
||||||
@ -394,11 +393,11 @@ func (i *InstanceManager) InstallQuilt(instance string, quiltVersion string) {
|
|||||||
}
|
}
|
||||||
client:
|
client:
|
||||||
for _, lib := range metadata.LauncherMeta.Libraries.Client {
|
for _, lib := range metadata.LauncherMeta.Libraries.Client {
|
||||||
tokens := strings.Split(ProcessMavenPath(lib.Name), "/")
|
tokens := strings.Split(ProcessMavenPath(lib.Name), string(os.PathSeparator))
|
||||||
pkg := tokens[len(tokens)-2]
|
pkg := tokens[len(tokens)-2]
|
||||||
instanceObject.Libraries = append(instanceObject.Libraries, filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name)))
|
instanceObject.Libraries = append(instanceObject.Libraries, filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name)))
|
||||||
for ind, path := range instanceObject.Libraries {
|
for ind, path := range instanceObject.Libraries {
|
||||||
tokens := strings.Split(path, "/")
|
tokens := strings.Split(path, string(os.PathSeparator))
|
||||||
if pkg == tokens[len(tokens)-3] {
|
if pkg == tokens[len(tokens)-3] {
|
||||||
instanceObject.Libraries[ind] = filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name))
|
instanceObject.Libraries[ind] = filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name))
|
||||||
fmt.Printf("duplicate library %s\n", pkg)
|
fmt.Printf("duplicate library %s\n", pkg)
|
||||||
@ -408,11 +407,11 @@ client:
|
|||||||
}
|
}
|
||||||
common:
|
common:
|
||||||
for _, lib := range metadata.LauncherMeta.Libraries.Common {
|
for _, lib := range metadata.LauncherMeta.Libraries.Common {
|
||||||
tokens := strings.Split(ProcessMavenPath(lib.Name), "/")
|
tokens := strings.Split(ProcessMavenPath(lib.Name), string(os.PathSeparator))
|
||||||
pkg := tokens[len(tokens)-2]
|
pkg := tokens[len(tokens)-2]
|
||||||
instanceObject.Libraries = append(instanceObject.Libraries, filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name)))
|
instanceObject.Libraries = append(instanceObject.Libraries, filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name)))
|
||||||
for ind, path := range instanceObject.Libraries {
|
for ind, path := range instanceObject.Libraries {
|
||||||
tokens := strings.Split(path, "/")
|
tokens := strings.Split(path, string(os.PathSeparator))
|
||||||
if pkg == tokens[len(tokens)-3] {
|
if pkg == tokens[len(tokens)-3] {
|
||||||
instanceObject.Libraries[ind] = filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name))
|
instanceObject.Libraries[ind] = filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name))
|
||||||
fmt.Printf("duplicate library %s\n", pkg)
|
fmt.Printf("duplicate library %s\n", pkg)
|
||||||
@ -456,11 +455,11 @@ func (i *InstanceManager) InstallForge(instance string, forgeVersion string) {
|
|||||||
instanceObject.ForgeVersion = forgeVersion
|
instanceObject.ForgeVersion = forgeVersion
|
||||||
outer:
|
outer:
|
||||||
for _, lib := range installData.Libraries {
|
for _, lib := range installData.Libraries {
|
||||||
tokens := strings.Split(lib.Downloads.Artifact.Path, "/")
|
tokens := strings.Split(lib.Downloads.Artifact.Path, string(os.PathSeparator))
|
||||||
pkg := tokens[len(tokens)-2]
|
pkg := tokens[len(tokens)-2]
|
||||||
instanceObject.Libraries = append(instanceObject.Libraries, lib.Downloads.Artifact.Path)
|
instanceObject.Libraries = append(instanceObject.Libraries, lib.Downloads.Artifact.Path)
|
||||||
for ind, path := range instanceObject.Libraries {
|
for ind, path := range instanceObject.Libraries {
|
||||||
tokens := strings.Split(path, "/")
|
tokens := strings.Split(path, string(os.PathSeparator))
|
||||||
if pkg == tokens[len(tokens)-3] {
|
if pkg == tokens[len(tokens)-3] {
|
||||||
instanceObject.Libraries[ind] = filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name))
|
instanceObject.Libraries[ind] = filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name))
|
||||||
fmt.Printf("duplicate library %s\n", pkg)
|
fmt.Printf("duplicate library %s\n", pkg)
|
||||||
|
@ -1 +1 @@
|
|||||||
48cb20b8d107dab0a7876a449352234a
|
ad9da3c17151b053a4d2fda8e3578901
|
Loading…
Reference in New Issue
Block a user