diff --git a/source/creator/creator_args.cc b/source/creator/creator_args.cc index 90df4ce9d34..d08641a7652 100644 --- a/source/creator/creator_args.cc +++ b/source/creator/creator_args.cc @@ -2675,18 +2675,18 @@ static bool handle_load_file(bContext *C, const char *filepath_arg, const bool l if (load_empty_file == false) { error_msg = error_msg_generic; } - else if (BLI_exists(filepath) && BKE_blendfile_extension_check(filepath)) { + else if (!BKE_blendfile_extension_check(filepath)) { + /* Non-blend. Continue loading and give warning. */ + G_MAIN->is_read_invalid = true; + return true; + } + else if (BLI_exists(filepath)) { /* When a file is found but can't be loaded, handling it as a new file * could cause it to be unintentionally overwritten (data loss). * Further this is almost certainly not that a user would expect or want. * If they do, they can delete the file beforehand. */ error_msg = error_msg_generic; } - else { - /* Non-blend or non-existing. Continue loading and give warning. */ - G_MAIN->is_read_invalid = true; - return true; - } if (error_msg) { fprintf(stderr, "Error: %s, exiting! %s\n", error_msg, filepath);