Browse Source

Attempt to account for BuildTools installer's lack of \

Jeroen van Rijn 11 months ago
parent
commit
3072a02d5d
1 changed files with 8 additions and 2 deletions
  1. 8 2
      src/microsoft_craziness.h

+ 8 - 2
src/microsoft_craziness.h

@@ -684,8 +684,14 @@ gb_internal void find_visual_studio_paths_from_env_vars(Find_Result *result) {
 			? str_lit("lib\\x64\\")
 			: str_lit("lib\\x86\\");
 
-		result->vs_exe_path     = mc_concat(vctid, exe);
-		result->vs_library_path = mc_concat(vctid, lib);
+		if (string_ends_with(vctid, str_lit("\\"))) {
+			result->vs_exe_path     = mc_concat(vctid, exe);
+			result->vs_library_path = mc_concat(vctid, lib);
+		} else {
+			result->vs_exe_path     = mc_concat(vctid, str_lit("\\"), exe);
+			result->vs_library_path = mc_concat(vctid, str_lit("\\"), lib);
+		}
+
 		vs_found = true;
 	}