瀏覽代碼

Merge pull request #17636 from rainerdeyke/fix_issue_17585

Fixes moving files causes scene corruption
Juan Linietsky 7 年之前
父節點
當前提交
5a1a90c3db
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      core/io/resource_format_binary.cpp

+ 5 - 3
core/io/resource_format_binary.cpp

@@ -1162,9 +1162,11 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons
 		ERR_FAIL_V(ERR_FILE_UNRECOGNIZED);
 	}
 
-	fw->store_32(VERSION_MAJOR); //current version
-	fw->store_32(VERSION_MINOR);
-	fw->store_32(FORMAT_VERSION);
+	// Since we're not actually converting the file contents, leave the version
+	// numbers in the file untouched.
+	fw->store_32(ver_major);
+	fw->store_32(ver_minor);
+	fw->store_32(ver_format);
 
 	save_ustring(fw, get_ustring(f)); //type