mirror of
https://github.com/packwiz/packwiz.git
synced 2025-04-19 21:16:30 +02:00
Fix lookup of old .toml files
This commit is contained in:
parent
fc3b5ff8ea
commit
bf2f060efc
@ -335,7 +335,7 @@ func (in Index) FindMod(modName string) (string, bool) {
|
|||||||
for _, v := range in.Files {
|
for _, v := range in.Files {
|
||||||
if v.MetaFile {
|
if v.MetaFile {
|
||||||
_, file := filepath.Split(v.File)
|
_, file := filepath.Split(v.File)
|
||||||
fileTrimmed := strings.TrimSuffix(file, MetaExtension)
|
fileTrimmed := strings.TrimSuffix(strings.TrimSuffix(file, MetaExtension), MetaExtensionOld)
|
||||||
if fileTrimmed == modName {
|
if fileTrimmed == modName {
|
||||||
return filepath.Join(filepath.Dir(in.indexFile), filepath.FromSlash(v.File)), true
|
return filepath.Join(filepath.Dir(in.indexFile), filepath.FromSlash(v.File)), true
|
||||||
}
|
}
|
||||||
|
@ -3,3 +3,5 @@ package core
|
|||||||
// MetaExtension is the file extension of the mod metadata files
|
// MetaExtension is the file extension of the mod metadata files
|
||||||
// Note that this is currently not required; it will only be used for new files.
|
// Note that this is currently not required; it will only be used for new files.
|
||||||
const MetaExtension = ".pw.toml"
|
const MetaExtension = ".pw.toml"
|
||||||
|
|
||||||
|
const MetaExtensionOld = ".toml"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user