From fe7d4230d8916a13e7f581d43b7fee8c754e32bd Mon Sep 17 00:00:00 2001 From: KillerxDBr <97485370+KillerxDBr@users.noreply.github.com> Date: Sun, 5 Jan 2025 05:31:14 -0400 Subject: [PATCH] Fix 'clean' command on Windows MinGW 'c3c clean' command try to use 'rm' on Windows MinGW compiled executable, since it does not define "_MSC_VER", but define "_WIN32" There are other uses of "_MSC_VER" in the same file, they probably can be changed to "_WIN32" too --- src/utils/file_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/file_utils.c b/src/utils/file_utils.c index a8f0c1f6f..86913fae1 100644 --- a/src/utils/file_utils.c +++ b/src/utils/file_utils.c @@ -550,7 +550,7 @@ bool file_delete_file(const char *path) void file_delete_all_files_in_dir_with_suffix(const char *path, const char *suffix) { ASSERT0(path); -#if (_MSC_VER) +#if (_WIN32) const char *cmd = "del /q \"%s\\*%s\" >nul 2>&1"; #else const char *cmd = "rm -f %s/*%s"; @@ -785,4 +785,4 @@ char *realpath(const char *path, char *const resolved_path) return result; } -#endif \ No newline at end of file +#endif