windows bug fixes by Bert Bell
This commit is contained in:
parent
88a7ac3da9
commit
de9faa82b7
2 changed files with 11 additions and 1 deletions
|
|
@ -151,7 +151,8 @@ namespace ctml {
|
|||
// then clean up by deleting the temporary Python file.
|
||||
#ifndef DEBUG_PATHS
|
||||
#ifdef WIN32
|
||||
cmd = "cmd /C rm " + path;
|
||||
//cmd = "cmd /C rm " + path;
|
||||
remove(path.c_str()) ;
|
||||
#else
|
||||
cmd = "rm -f " + path;
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -29,6 +29,10 @@
|
|||
#undef DEBUG_PATHS
|
||||
|
||||
#include <fstream>
|
||||
#ifdef WIN32
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#endif
|
||||
using namespace std;
|
||||
|
||||
namespace Cantera {
|
||||
|
|
@ -214,6 +218,11 @@ namespace Cantera {
|
|||
// so it is replaced by:
|
||||
path = findInputFile(file);
|
||||
//
|
||||
#ifdef WIN32
|
||||
// RFB: For Windows make the path POSIX compliant so code looking for directory
|
||||
// separators is simpler. Just look for '/' not both '/' and '\\'
|
||||
replace_if( path.begin(), path.end(), bind2nd( equal_to<char>(), '\\'), '/' ) ;
|
||||
#endif
|
||||
|
||||
string ff = path;
|
||||
if (app()->xmlfiles.find(path)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue