@@ -48,7 +48,7 @@ CConfigManager::CConfigManager(const std::string& configPath) :
4848 m_currentConfigPath = configPath.empty () ? getMainConfigPath () : configPath;
4949}
5050
51- void CConfigManager::init () {
51+ bool CConfigManager::init () {
5252 m_config.addConfigValue (" splash" , Hyprlang::INT {1 });
5353 m_config.addConfigValue (" splash_offset" , Hyprlang::INT {20 });
5454 m_config.addConfigValue (" splash_opacity" , Hyprlang::FLOAT {0.8 });
@@ -64,10 +64,13 @@ void CConfigManager::init() {
6464
6565 auto result = m_config.parse ();
6666
67- if (result.error )
68- g_logger->log (LOG_ERR , " Config has errors:\n {}\n Proceeding ignoring faulty entries" , result.getError ());
67+ if (result.error ) {
68+ g_logger->log (LOG_ERR , " Config has errors:\n {}" , result.getError ());
69+ return false ;
70+ }
6971
7072 g_matcher->addStates (getSettings ());
73+ return true ;
7174}
7275
7376Hyprlang::CConfig* CConfigManager::hyprlang () {
@@ -117,10 +120,10 @@ static std::expected<std::vector<std::string>, std::string> getFullPath(const st
117120
118121 if (std::filesystem::is_directory (resolvedPath))
119122 for (const auto & entry : std::filesystem::directory_iterator (resolvedPath, std::filesystem::directory_options::skip_permission_denied)) {
120- if (entry.is_regular_file () && isImage (entry.path ()))
123+ if (entry.is_regular_file () && isImage (entry.path ()))
121124 result.push_back (entry.path ());
122125
123- if (result.size () >= maxImagesCount)
126+ if (result.size () >= maxImagesCount)
124127 break ;
125128 }
126129 else if (isImage (resolvedPath))
0 commit comments