diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-07-08 15:08:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-08 15:08:45 +0200 |
commit | 56269e2db835e50a4cf2681bb73c44ae41fcca10 (patch) | |
tree | 6ab7e553c9ca3efd3c664abaddf8aa76c3331b61 | |
parent | 410cb13abdf5699bdcd6e73728c947e1e75b4cad (diff) | |
parent | a84124fd1dd7e4cc797eec45db93fb53fd662e48 (diff) |
Merge pull request #29613 from Calinou/doctool-create-directories
Make `--doctool` create directories if they don't exist
-rw-r--r-- | main/main.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp index 3f84eca1d2..ef5c4109db 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1374,7 +1374,7 @@ bool Main::start() { { DirAccessRef da = DirAccess::open(doc_tool); if (!da) { - ERR_EXPLAIN("Argument supplied to --doctool must be a base godot build directory"); + ERR_EXPLAIN("Argument supplied to --doctool must be a base Godot build directory"); ERR_FAIL_V(false); } } @@ -1392,12 +1392,23 @@ bool Main::start() { doc_data_classes[name] = path; if (!checked_paths.has(path)) { checked_paths.insert(path); + + // Create the module documentation directory if it doesn't exist + DirAccess *da = DirAccess::create_for_path(path); + da->make_dir_recursive(path); + memdelete(da); + docsrc.load_classes(path); print_line("Loading docs from: " + path); } } String index_path = doc_tool.plus_file("doc/classes"); + // Create the main documentation directory if it doesn't exist + DirAccess *da = DirAccess::create_for_path(index_path); + da->make_dir_recursive(index_path); + memdelete(da); + docsrc.load_classes(index_path); checked_paths.insert(index_path); print_line("Loading docs from: " + index_path); |