ZeroC

Archived

This forum has been archived. Please start a new discussion on GitHub.

Patch to handle spaces in filenames for slice compilers

acbell
acbell
Super simple fix for handling embedded spaces in filenames when invoking the slice compilers. You may have a better way of handling this, but this works for us:) If there are other functions that you pipe stuff to, they probably need to be fixed as well, but I didn't go looking for them.

Cheers,

-- Andrew Bell
andrew.bell.ia@gmail.com

Ice Version: 2.1.0
File :src/Slice/Preprocessor.cpp


--- Preprocessor.cpp Mon Mar 7 08:15:10 2005
+++ Preprocessor.cpp.save Tue Apr 26 13:59:05 2005

cmd += " -C";
}

- cmd += " " + _args + " " + _fileName;
+ cmd += " " + _args + " \"" + _fileName + "\"";

//
// Open a pipe for reading to redirect icecpp output to _cppHandle.

return;
}

- cmd += " -M " + _args + " " + _fileName;
+ cmd += " -M " + _args + " \"" + _fileName + "\"";

#ifdef _WIN32
FILE* cppHandle = _popen(cmd.c_str(), "r");";

Comments

  • michi
    michi
    Hi Andrew, thanks for the patch! I'll have a look at integrating this.

    Cheers,

    Michil.