]> git.mxchange.org Git - flightgear.git/commitdiff
fgValidatePath: fix \ vs / Windows bug
authorRebecca N. Palmer <rebecca_palmer@zoho.com>
Tue, 14 Jul 2015 07:00:22 +0000 (08:00 +0100)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Tue, 14 Jul 2015 07:00:22 +0000 (08:00 +0100)
src/Main/util.cxx

index 40d3244d6dfeb3bfa24176c11a01a4739c183af0..d6be946fa3ca35c68a77faaab58e0b9e8e30a23d 100644 (file)
@@ -216,6 +216,9 @@ std::string fgValidatePath (const std::string& path, bool write)
         normed_path2 = SGPath(path2.dir()).realpath()
             + "/" + path2.file();
     }
+#if defined(_MSC_VER) /*for MS compilers */ || defined(_WIN32) /*needed for non MS windows compilers like MingW*/
+     normed_path2 = SGPath(normed_path2).str(); // convert \ to /
+#endif
 
     // Check
     if (fgValidatePath_internal(normed_path1, write).empty() ||