if( r != E_SUCCESS)
{
- _ThemeInfo::LoadThemeInfoFromDatabase(systemTheme, userTheme);
+ r = _ThemeInfo::LoadThemeInfoFromDatabase(systemTheme, userTheme);
}
return r;
// Get UI theme info from info/[appId]/uitheme.info
{
- File uiThemeInfoFile;
const String themeInfoFilePath(L"info/" + appId + L"/" + _theme_info_file);
- r = uiThemeInfoFile.Construct(_AppInfo::GetAppRootPath() + themeInfoFilePath, L"r");
- SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating.");
-
- r = uiThemeInfoFile.Read(uiThemeInfoString);
- SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating.");
+ if (File::IsFileExist(_AppInfo::GetAppRootPath() + themeInfoFilePath)) {
+ File uiThemeInfoFile;
+ r = uiThemeInfoFile.Construct(_AppInfo::GetAppRootPath() + themeInfoFilePath, L"r");
+ SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating.");
+
+ r = uiThemeInfoFile.Read(uiThemeInfoString);
+ SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating.");
+ } else {
+ ClearLastResult();
+ return E_FILE_NOT_FOUND;
+ }
}
StringTokenizer infoTokenizer(uiThemeInfoString, L" ");