summaryrefslogtreecommitdiffstats
path: root/modules/mono/godotsharp_dirs.cpp
diff options
context:
space:
mode:
authorUnknown <m.hilbrunner@gmail.com>2017-10-27 21:22:54 +0200
committerUnknown <m.hilbrunner@gmail.com>2017-10-27 21:22:54 +0200
commita2247d45fcc1211937bf5103b1fe575720a1d95e (patch)
tree682feec695b0fabc2715e7e0cb4b7cfe2307b92d /modules/mono/godotsharp_dirs.cpp
parent70c3ea5a8274739f0c4ae0377940b303fb83e8bf (diff)
downloadredot-engine-a2247d45fcc1211937bf5103b1fe575720a1d95e.tar.gz
Mono: Use "UnnamedProject" if application/config/name is empty
Diffstat (limited to 'modules/mono/godotsharp_dirs.cpp')
-rw-r--r--modules/mono/godotsharp_dirs.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/mono/godotsharp_dirs.cpp b/modules/mono/godotsharp_dirs.cpp
index 6bcf0e2355..7cc2168b70 100644
--- a/modules/mono/godotsharp_dirs.cpp
+++ b/modules/mono/godotsharp_dirs.cpp
@@ -122,7 +122,14 @@ private:
#ifdef TOOLS_ENABLED
mono_solutions_dir = mono_user_dir.plus_file("solutions");
build_logs_dir = mono_user_dir.plus_file("build_logs");
- String base_path = String("res://") + ProjectSettings::get_singleton()->get("application/config/name");
+
+ String name = ProjectSettings::get_singleton()->get("application/config/name");
+ if (name.empty()) {
+ name = "UnnamedProject";
+ }
+
+ String base_path = String("res://") + name;
+
sln_filepath = ProjectSettings::get_singleton()->globalize_path(base_path + ".sln");
csproj_filepath = ProjectSettings::get_singleton()->globalize_path(base_path + ".csproj");
#endif