Skip to content

Commit

Permalink
Merge pull request #57 from gregandcin/dlc-xbx-check
Browse files Browse the repository at this point in the history
Add Check for `ContentMeta.xbx` inside of DLC directories
  • Loading branch information
MrMilenko authored Jan 18, 2024
2 parents 9091083 + 704f94c commit 48de98b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
dump/.DS_Store
dump/TDATA/.DS_Store
.DS_Store

dump/**/

# Go related
# Binaries for programs and plugins
Expand Down
17 changes: 17 additions & 0 deletions pinecone.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,23 @@ func processDLCContent(subDirDLC string, titleData TitleData, titleID string, di
continue
}

subDirContents, err := os.ReadDir(subContentPath)
if err != nil {
return err
}

hasContentMetaXbx := false
for _, dlcFiles := range subDirContents {
if strings.Contains(strings.ToLower(dlcFiles.Name()), "contentmeta.xbx") && !dlcFiles.IsDir() {
hasContentMetaXbx = true
break
}
}

if !hasContentMetaXbx {
continue
}

contentID := strings.ToLower(subContent.Name())
if !contains(titleData.ContentIDs, contentID) {
printInfo(color.FgRed, "Unknown content found at: %s\n", subContentPath)
Expand Down

0 comments on commit 48de98b

Please sign in to comment.