mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-25 15:05:00 -07:00
Add .bin extension in extra case
This commit is contained in:
@@ -1502,9 +1502,15 @@ 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(".")) && path_is_directory(last_path_element(init_filename))) {
|
||||
// Add .bin extension to avoid collision
|
||||
// with package directory name
|
||||
} 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");
|
||||
}
|
||||
} else if (path_is_directory(last_path_element(init_filename))) {
|
||||
output_extension = STR_LIT("bin");
|
||||
}
|
||||
} else if (build_context.build_mode == BuildMode_DynamicLibrary) {
|
||||
|
||||
Reference in New Issue
Block a user