{"record":{"id":"e0b4b8b40076d32b","repo":"Flow-Launcher/Flow.Launcher","slug":"theme-path-can-t-be-found-path","errorCode":null,"errorMessage":"Theme path can't be found <{path}>","messagePattern":"Theme path can't be found <(.+?)>","errorType":"exception","errorClass":"DirectoryNotFoundException","httpStatus":null,"severity":"warning","filePath":"Flow.Launcher.Core/Resource/Theme.cs","lineNumber":419,"sourceCode":"                var filePaths = Directory\n                    .GetFiles(themeDirectory)\n                    .Where(filePath => filePath.EndsWith(Extension) && !filePath.EndsWith(\"Base.xaml\"))\n                    .Select(GetThemeDataFromPath);\n                themes.AddRange(filePaths);\n            }\n\n            return themes.OrderBy(o => o.Name).ToList();\n        }\n\n        public bool ChangeTheme(string theme = null)\n        {\n            if (string.IsNullOrEmpty(theme)) theme = _settings.Theme;\n\n            string path = GetThemePath(theme);\n            try\n            {\n                if (string.IsNullOrEmpty(path))\n                    throw new DirectoryNotFoundException($\"Theme path can't be found <{path}>\");\n\n                _settings.Theme = theme;\n\n                // Always allow re-loading default theme, in case of failure of switching to a new theme from default theme\n                if (_oldTheme != theme || theme == Constant.DefaultTheme)\n                {\n                    _oldTheme = Path.GetFileNameWithoutExtension(_oldResource.Source.AbsolutePath);\n                }\n\n                // Check if blur is enabled\n                var dict = GetThemeResourceDictionary(theme);\n                BlurEnabled = Win32Helper.IsBackdropSupported() && IsThemeBlurEnabled(dict);\n\n                // Apply blur and drop shadow effect so that we do not need to call it again\n                _ = RefreshFrameAsync();\n\n                return true;\n            }","sourceCodeStart":401,"sourceCodeEnd":437,"githubUrl":"https://github.com/Flow-Launcher/Flow.Launcher/blob/7fc63b07bbaa10a0f0b2601487913fcba9ed24b0/Flow.Launcher.Core/Resource/Theme.cs#L401-L437","documentation":"Thrown as DirectoryNotFoundException when GetThemePath(theme) returns null or empty for the requested theme name. There is an explicit catch (DirectoryNotFoundException) at line 438 that logs, shows a message box, and recursively falls back to Constant.DefaultTheme — so a non-default theme failure recovers automatically; only failure of the default theme itself propagates.","triggerScenarios":"The user's Settings.Theme names a theme whose .xaml file was deleted or never installed; a theme was installed to a non-default theme directory that is no longer on the search path; the theme file extension or naming convention changed between versions and the stored name no longer resolves; GetThemePath returns empty for any reason (permissions, path corruption).","commonSituations":"User uninstalls/deletes a custom theme folder but leaves it set in Settings; portable/multi-machine setups where the theme directory differs; migration between Flow Launcher versions that relocated theme storage; antivirus blocking access to the theme folder so enumeration yields nothing.","solutions":["Open Settings > Theme and pick an installed theme (or the default) to reset Settings.Theme.","Confirm the theme's .xaml file exists under one of the configured theme directories and its filename matches the theme name.","If the error recurs even after resetting, check that the default theme file (Constant.DefaultTheme) is present in the install directory — that is the final fallback.","Verify read permissions on the theme directory for the current user."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"if (string.IsNullOrEmpty(GetThemePath(theme)) && theme != Constant.DefaultTheme)\n{ _api.ShowMsgBox(Localize.theme_load_failure_path_not_exists(theme)); ChangeTheme(Constant.DefaultTheme); return false; }","typeGuard":"null","tryCatchPattern":"try { return ChangeTheme(theme); }\ncatch (DirectoryNotFoundException) when (theme != Constant.DefaultTheme)\n{ return ChangeTheme(Constant.DefaultTheme); }","preventionTips":["Keep Settings.Theme pointed at an installed theme.","After deleting a custom theme, switch Settings to the default.","Confirm theme .xaml files exist before referencing them.","Ensure read permissions on theme directories."],"tags":["theme","ui","filesystem","config"],"backgroundTag":null,"analyzedSha":"7fc63b07bbaa10a0f0b2601487913fcba9ed24b0","analyzedAt":"2026-08-13T14:54:20.914Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}