diff options
Diffstat (limited to 'editor/editor_export.cpp')
-rw-r--r-- | editor/editor_export.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index d08a595fd2..4caf2641fc 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -278,7 +278,7 @@ Error EditorExportPlatform::_save_pack_file(void *p_userdata, const String &p_pa SavedData sd; sd.path_utf8 = p_path.utf8(); - sd.ofs = pd->f->get_pos(); + sd.ofs = pd->f->get_position(); sd.size = p_data.size(); pd->f->store_buffer(p_data.ptr(), p_data.size()); @@ -736,7 +736,7 @@ Error EditorExportPlatform::save_pack(const Ref<EditorExportPreset> &p_preset, c f->store_32(pd.file_ofs.size()); //amount of files - size_t header_size = f->get_pos(); + size_t header_size = f->get_position(); //precalculate header size @@ -1246,9 +1246,13 @@ Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_pr } DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); - da->copy(template_path, p_path); + Error err = da->copy(template_path, p_path, get_chmod_flags()); memdelete(da); + if (err != OK) { + return err; + } + String pck_path = p_path.get_basename() + ".pck"; return save_pack(p_preset, pck_path); @@ -1302,5 +1306,17 @@ void EditorExportPlatformPC::get_platform_features(List<String> *r_features) { } } +int EditorExportPlatformPC::get_chmod_flags() const { + + return chmod_flags; +} + +void EditorExportPlatformPC::set_chmod_flags(int p_flags) { + + chmod_flags = p_flags; +} + EditorExportPlatformPC::EditorExportPlatformPC() { + + chmod_flags = -1; } |