diff --git a/core/index.go b/core/index.go index ac5cec1..2acc749 100644 --- a/core/index.go +++ b/core/index.go @@ -335,7 +335,7 @@ func (in Index) FindMod(modName string) (string, bool) { for _, v := range in.Files { if v.MetaFile { _, file := filepath.Split(v.File) - fileTrimmed := strings.TrimSuffix(file, MetaExtension) + fileTrimmed := strings.TrimSuffix(strings.TrimSuffix(file, MetaExtension), MetaExtensionOld) if fileTrimmed == modName { return filepath.Join(filepath.Dir(in.indexFile), filepath.FromSlash(v.File)), true } diff --git a/core/resolve.go b/core/resolve.go index 19494f5..6593f1c 100644 --- a/core/resolve.go +++ b/core/resolve.go @@ -3,3 +3,5 @@ package core // 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. const MetaExtension = ".pw.toml" + +const MetaExtensionOld = ".toml"