Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/windowmanager/intern/wm_platform_support.c')
-rw-r--r--source/blender/windowmanager/intern/wm_platform_support.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/source/blender/windowmanager/intern/wm_platform_support.c b/source/blender/windowmanager/intern/wm_platform_support.c
index becc2d896d0..a0519506d29 100644
--- a/source/blender/windowmanager/intern/wm_platform_support.c
+++ b/source/blender/windowmanager/intern/wm_platform_support.c
@@ -32,35 +32,35 @@
*/
static bool wm_platform_support_check_approval(const char *platform_support_key, bool update)
{
- const char *const cfgdir = BKE_appdir_folder_id(BLENDER_USER_CONFIG, NULL);
- bool result = false;
-
if (G.factory_startup) {
- return result;
+ return false;
+ }
+ const char *const cfgdir = BKE_appdir_folder_id(BLENDER_USER_CONFIG, NULL);
+ if (!cfgdir) {
+ return false;
}
- if (cfgdir) {
- char filepath[FILE_MAX];
- BLI_join_dirfile(filepath, sizeof(filepath), cfgdir, BLENDER_PLATFORM_SUPPORT_FILE);
- LinkNode *lines = BLI_file_read_as_lines(filepath);
- for (LinkNode *line_node = lines; line_node; line_node = line_node->next) {
- char *line = line_node->link;
- if (STREQ(line, platform_support_key)) {
- result = true;
- break;
- }
+ bool result = false;
+ char filepath[FILE_MAX];
+ BLI_join_dirfile(filepath, sizeof(filepath), cfgdir, BLENDER_PLATFORM_SUPPORT_FILE);
+ LinkNode *lines = BLI_file_read_as_lines(filepath);
+ for (LinkNode *line_node = lines; line_node; line_node = line_node->next) {
+ char *line = line_node->link;
+ if (STREQ(line, platform_support_key)) {
+ result = true;
+ break;
}
+ }
- if (!result && update) {
- FILE *fp = BLI_fopen(filepath, "a");
- if (fp) {
- fprintf(fp, "%s\n", platform_support_key);
- fclose(fp);
- }
+ if (!result && update) {
+ FILE *fp = BLI_fopen(filepath, "a");
+ if (fp) {
+ fprintf(fp, "%s\n", platform_support_key);
+ fclose(fp);
}
-
- BLI_file_free_lines(lines);
}
+
+ BLI_file_free_lines(lines);
return result;
}