diff options
author | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-03 21:34:00 +0000 |
---|---|---|
committer | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-03 21:34:00 +0000 |
commit | cd5e53a52754d50b6aff82e5e1c984e001559079 (patch) | |
tree | b4ed32e68394e8b9ab663de81fb02dee23743ec2 /o3d/import | |
parent | 6e8c0827a59df4b52851735bcd2029b0d5fc04c2 (diff) | |
download | chromium_src-cd5e53a52754d50b6aff82e5e1c984e001559079.zip chromium_src-cd5e53a52754d50b6aff82e5e1c984e001559079.tar.gz chromium_src-cd5e53a52754d50b6aff82e5e1c984e001559079.tar.bz2 |
Quote the path to the temporary file containing the Cg shader to fix
problems in particular on Windows XP where the temporary directory
path contains spaces.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/1872003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46277 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/import')
-rw-r--r-- | o3d/import/cross/collada.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/o3d/import/cross/collada.cc b/o3d/import/cross/collada.cc index 7de80af..562641f 100644 --- a/o3d/import/cross/collada.cc +++ b/o3d/import/cross/collada.cc @@ -534,7 +534,15 @@ bool ConvertCgToGlsl(const FilePath& converter, String* effect_string) { #endif cmd_line.AppendLooseValue(L"-i"); - cmd_line.AppendLooseValue(o3d::FilePathToWide(temporary_file_name)); + std::wstring temporary_file_string = + o3d::FilePathToWide(temporary_file_name); +#if defined(OS_WIN) + // Quote to be safe. Note that this breaks on POSIX platforms. + std::wstring quote(L"\""); + temporary_file_string = + quote + temporary_file_string + quote; +#endif + cmd_line.AppendLooseValue(temporary_file_string); bool rc = ::base::GetAppOutput(cmd_line, effect_string); file_util::Delete(temporary_file_name, false); |