diff --git a/src/openscad.cc b/src/openscad.cc index 12e22ce8..ad6cbf92 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -453,16 +453,12 @@ int cmdline(const char *deps_output_file, const std::string &filename, Camera &c #include #include #include -#include // Only if "fileName" is not absolute, prepend the "absoluteBase". -static QString assemblePath(const fs::path& absoluteBaseDir, +static QString assemblePath(const fs::path& absoluteBase, const string& fileName) { - if (fileName.empty()) return ""; - QString qsDir( boosty::stringy( absoluteBaseDir ).c_str() ); - QString qsFile( fileName.c_str() ); - QFileInfo info( qsDir, qsFile ); // if qsfile is absolute, dir is ignored. - return info.absoluteFilePath(); + return fileName.empty() ? "" : QDir(QString::fromStdString((const string&) absoluteBase)) + .absoluteFilePath(QString::fromStdString(fileName)); } bool QtUseGUI() diff --git a/src/winconsole.c b/src/winconsole.c index 11a03090..de8e6825 100644 --- a/src/winconsole.c +++ b/src/winconsole.c @@ -40,24 +40,16 @@ int main( int argc, char * argv[] ) int eof = 0; int pclose_result; int i; - const char * argchar; int result = 0; - int quotify_arg = 0; strcat( cmd, "\0" ); strcat( cmd, "openscad.exe" ); for ( i = 1 ; i < argc ; ++i ) { - quotify_arg = 0; - for ( argchar = argv[i]; *argchar!=0; argchar++ ) { - if ((char)(*argchar)==' ') quotify_arg = 1; - } strcat( cmd, " " ); - if (quotify_arg) strcat( cmd, "\""); strcat( cmd, argv[i] ); - if (quotify_arg) strcat( cmd, "\""); } + strcat( cmd, " "); strcat( cmd, " 2>&1"); // capture stderr and stdout - printf("openscad.com: running command: %s\n", cmd ); cmd_stdout = _popen( cmd, "rt" ); if ( cmd_stdout == NULL ) {