diff options
| author | Kent Quirk <q@lindenlab.com> | 2010-01-31 00:11:25 -0500 | 
|---|---|---|
| committer | Kent Quirk <q@lindenlab.com> | 2010-01-31 00:11:25 -0500 | 
| commit | 16f9ba66e46fd056e3b6ea68202e59a9b84cb27b (patch) | |
| tree | 319dca911c08a080d6239cdf71d74c619b12aa0a /indra/newview | |
| parent | 78f22028100a05d2b8c6cdf82b096fa83ef33cec (diff) | |
Fix for XUI previewer on Windows - DEV-45525
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llfloateruipreview.cpp | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 1e92ac0b8e..645f8ef054 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -1051,6 +1051,7 @@ void LLFloaterUIPreview::onClickEditFloater()  	if(!LLFile::stat(exe_path.c_str(), &s)) // If the executable exists  	{  		// build paths and arguments +		std::string quote = std::string("\"");  		std::string args;  		std::string custom_args = mEditorArgsTextBox->getText();  		int position_of_file = custom_args.find(std::string("%FILE%"), 0);	// prepare to replace %FILE% with actual file path @@ -1058,7 +1059,7 @@ void LLFloaterUIPreview::onClickEditFloater()  		std::string second_part_of_args = "";  		if(-1 == position_of_file)	// default: Executable.exe File.xml  		{ -			args = std::string("\"") + path + std::string("\"");			// execute the command Program.exe "File.xml" +			args = quote + path + quote;			// execute the command Program.exe "File.xml"  		}  		else						// use advanced command-line arguments, e.g. "Program.exe -safe File.xml" -windowed for "-safe %FILE% -windowed"  		{ @@ -1085,7 +1086,7 @@ void LLFloaterUIPreview::onClickEditFloater()  		memset(&pinfo, 0, sizeof(pinfo));  		std::string exe_name = exe_path.substr(last_slash_position+1); -		args = exe_name + std::string(" ") + args;				// and prepend the executable name, so we get 'Program.exe "Arg1"' +		args = quote + exe_name + quote + std::string(" ") + args;				// and prepend the executable name, so we get 'Program.exe "Arg1"'  		char *args2 = new char[args.size() + 1];	// Windows requires that the second parameter to CreateProcessA be a writable (non-const) string...  		strcpy(args2, args.c_str()); | 
