Skip to content

Commit

Permalink
support NSZ (beta)
Browse files Browse the repository at this point in the history
  • Loading branch information
giwty authored and giwty committed Jul 28, 2020
1 parent 4582b40 commit d40c1d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion db/localSwitchFilesDB.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func GetGameMetadata(file os.FileInfo, filePath string) (*switchfs.ContentMetaAt
var err error

if keys != nil && keys.GetKey("header_key") != "" {
if strings.HasSuffix(file.Name(), "nsp") {
if strings.HasSuffix(file.Name(), "nsp") || strings.HasSuffix(file.Name(), "nsz") {
metadata, err = switchfs.ReadNspMetadata(filePath)
if err != nil {
zap.S().Errorf("[file:%v] failed to read NSP [reason: %v]\n", file.Name(), err)
Expand Down
2 changes: 1 addition & 1 deletion switchfs/nsp.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func ReadNspMetadata(filePath string) (*ContentMetaAttributes, error) {

if !strings.HasSuffix(filePath, "nsp") {
if !strings.HasSuffix(filePath, "nsp") && !strings.HasSuffix(filePath, "nsz") {
return nil, errors.New("only NSP file type is supported")
}

Expand Down

0 comments on commit d40c1d7

Please sign in to comment.