diff options
| author | Ignacio Etcheverry <neikeq@users.noreply.github.com> | 2019-01-21 01:32:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-21 01:32:07 +0100 |
| commit | 0babbca67e80402611e219f13473203cbe22571b (patch) | |
| tree | c826f04309b33bd0bf666eeb00f5e6d50ec52e1c /modules/mono/editor/csharp_project.cpp | |
| parent | 09e4d7e9ebb3aa1f1d8b7adf96778a9568797518 (diff) | |
| parent | 0ac5be8368e6d7d0fcb8708426b785471e4a3284 (diff) | |
Merge pull request #25177 from neikeq/nn
Workaround for bug with Mono's MSBuild and BaseIntermediateOutputPath
Diffstat (limited to 'modules/mono/editor/csharp_project.cpp')
| -rw-r--r-- | modules/mono/editor/csharp_project.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/mono/editor/csharp_project.cpp b/modules/mono/editor/csharp_project.cpp index 4397bb9b6a..beeff51bc2 100644 --- a/modules/mono/editor/csharp_project.cpp +++ b/modules/mono/editor/csharp_project.cpp @@ -228,6 +228,15 @@ Error generate_scripts_metadata(const String &p_project_path, const String &p_ou if (new_dict.size()) { String json = JSON::print(new_dict, "", false); + String base_dir = p_output_path.get_base_dir(); + + if (!DirAccess::exists(base_dir)) { + DirAccessRef da = DirAccess::create(DirAccess::ACCESS_RESOURCES); + + Error err = da->make_dir_recursive(base_dir); + ERR_FAIL_COND_V(err != OK, ERR_CANT_CREATE); + } + Error ferr; FileAccess *f = FileAccess::open(p_output_path, FileAccess::WRITE, &ferr); ERR_EXPLAIN("Cannot open file for writing: " + p_output_path); |