{"record":{"id":"6babe3464fe2f309","repo":"JosefNemec/Playnite","slug":"theme-changelog-not-found","errorCode":null,"errorMessage":"Theme changelog not found.","messagePattern":"Theme changelog not found\\.","errorType":"exception","errorClass":"FileNotFoundException","httpStatus":null,"severity":"error","filePath":"source/Tools/Playnite.Toolbox/Themes.cs","lineNumber":60,"sourceCode":"        };\r\n\r\n        public static List<string> PackageFileBlackListRegex { get; } = new List<string>\r\n        {\r\n            @\"\\.sln$\",\r\n            @\"\\.csproj$\",\r\n            @\"\\.csproj\\.user$\",\r\n            @\"^Fonts\\\\\",\r\n            @\"^\\.vs\\\\\",\r\n            @\"^bin\\\\\",\r\n            @\"^obj\\\\\",\r\n            @\"^backup_\"\r\n        };\r\n\r\n        public static List<FileChange> GetThemeChangelog(Version baseVersion, ApplicationMode mode, string changelogDir)\r\n        {\r\n            if (!Directory.Exists(changelogDir))\r\n            {\r\n                throw new FileNotFoundException(\"Theme changelog not found.\");\r\n            }\r\n\r\n            var changes = new List<FileChange>();\r\n            foreach (var changeFile in Directory.GetFiles(changelogDir, \"*.txt\").OrderBy(a => a))\r\n            {\r\n                var match = Regex.Match(Path.GetFileName(changeFile), @\"(.+)-(.+)\\.txt\");\r\n                if (!match.Success)\r\n                {\r\n                    continue;\r\n                }\r\n\r\n                var oldVersion = new Version(match.Groups[1].Value);\r\n                var newVersion = new Version(match.Groups[2].Value);\r\n                if (oldVersion < baseVersion)\r\n                {\r\n                    continue;\r\n                }\r\n\r","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/JosefNemec/Playnite/blob/5911f4e964e628aa7a69c2030ab35101afa63067/source/Tools/Playnite.Toolbox/Themes.cs#L42-L78","documentation":"Thrown by Themes.GetThemeChangelog when the changelogDir passed in does not exist on disk. It is a DirectoryNotFoundException surfaced as FileNotFoundException with the literal message 'Theme changelog not found.' The parameterless overload forwards Paths.ChangeLogsDir (= <ProgramPath>/Templates/Themes/Changelog), so missing that shipped folder is the usual cause.","triggerScenarios":"Calling GetThemeChangelog(baseVersion, mode) (no dir arg) when the Toolbox install is missing Templates/Themes/Changelog; or calling the 3-arg overload with a custom changelogDir path that does not exist.","commonSituations":"Running Toolbox from a build output directory without copying the Templates tree; partial/extract-only install; a portable build where ProgramPath resolves to a folder that lacks the changelog template data; CI that publishes the binary without content files.","solutions":["Confirm the changelog folder exists: check <ToolboxProgramPath>/Templates/Themes/Changelog and that it contains *.txt files named like <ver>-<ver>.txt.","If calling the 3-arg overload, pass an absolute path you have verified with Directory.Exists first.","Reinstall or re-copy the Toolbox distribution so its Templates content ships alongside the executable.","Verify PlaynitePaths.ProgramPath resolves where you expect (it drives Paths.ChangeLogsDir)."],"exampleFix":"// before\nvar changes = Themes.GetThemeChangelog(baseVer, mode, @\".\\changelogs\"); // may not exist\n\n// after\nvar dir = Paths.ChangeLogsDir;\nif (!Directory.Exists(dir))\n    throw new DirectoryNotFoundException($\"Changelog dir missing: {dir}\");\nvar changes = Themes.GetThemeChangelog(baseVer, mode, dir);","handlingStrategy":"validation","validationCode":"var dir = changelogDir ?? Paths.ChangeLogsDir;\nif (!Directory.Exists(dir))\n    throw new DirectoryNotFoundException($\"Theme changelog directory not found: {dir}\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Ship the Templates/Themes/Changelog content with every Toolbox distribution.","When using a custom changelog dir, verify Directory.Exists first and pass an absolute path.","In CI, assert the changelog template tree is present before invoking changelog generation."],"tags":["themes","toolbox","filesystem","changelog","precondition"],"backgroundTag":null,"analyzedSha":"5911f4e964e628aa7a69c2030ab35101afa63067","analyzedAt":"2026-08-13T17:38:25.713Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}