diff options
| author | Mark Naughton <mark@marknaughton.com> | 2023-04-26 16:39:47 +0100 |
|---|---|---|
| committer | Mark Naughton <mark@marknaughton.com> | 2023-04-26 16:39:47 +0100 |
| commit | 4b4481ea274283489f39fe3ac3ae871d26a2b46d (patch) | |
| tree | afc4bbcb0298f5c8d37ccdae3be25b63aa67528e /src/build_settings.cpp | |
| parent | e84802468b61522b64e15a0eaa6cffe6029311e6 (diff) | |
Simplify extension addition logic
Diffstat (limited to 'src/build_settings.cpp')
| -rw-r--r-- | src/build_settings.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/build_settings.cpp b/src/build_settings.cpp index b7ecd15f2..b74207b85 100644 --- a/src/build_settings.cpp +++ b/src/build_settings.cpp @@ -1502,16 +1502,9 @@ gb_internal bool init_build_paths(String init_filename) { if (build_context.metrics.os == TargetOs_windows) { output_extension = STR_LIT("exe"); - } else if (str_eq(init_filename, str_lit("."))) { - // Avoid conflict in edge case where directory to be compiled is - // the same as the current directory's name - if (path_is_directory(last_path_element(get_current_directory()))) { - // Add .bin extension to avoid collision - // with package directory name - output_extension = STR_LIT("bin"); - } - // Path could be absolute or relative } else if (path_is_directory(last_path_element(bc->build_paths[BuildPath_Main_Package].basename))) { + // Add .bin extension to avoid collision + // with package directory name output_extension = STR_LIT("bin"); } } else if (build_context.build_mode == BuildMode_DynamicLibrary) { |