mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Simplify exe path check.
This commit is contained in:
+1
-2
@@ -6544,8 +6544,7 @@ gb_internal ParseFileError parse_packages(Parser *p, String init_filename) {
|
|||||||
if ((build_context.command_kind & Command__does_build) &&
|
if ((build_context.command_kind & Command__does_build) &&
|
||||||
build_context.build_mode == BuildMode_Executable) {
|
build_context.build_mode == BuildMode_Executable) {
|
||||||
String output_path = path_to_string(temporary_allocator(), build_context.build_paths[8]);
|
String output_path = path_to_string(temporary_allocator(), build_context.build_paths[8]);
|
||||||
char *cpath = alloc_cstring(temporary_allocator(), output_path);
|
if (path_is_directory(output_path)) {
|
||||||
if (path_is_directory(output_path) && gb_file_exists(cpath)) {
|
|
||||||
error({}, "Please specify the executable name with -out:<string> as a directory exists with the same name in the current working directory");
|
error({}, "Please specify the executable name with -out:<string> as a directory exists with the same name in the current working directory");
|
||||||
return ParseFile_DirectoryAlreadyExists;
|
return ParseFile_DirectoryAlreadyExists;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user