summaryrefslogtreecommitdiff
path: root/indra/newview/llfloateruipreview.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-02-02 12:17:29 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2010-02-02 12:17:29 +0200
commit9b0518dd8e46dfe74eaa0f7622b1486dbde32b82 (patch)
tree2c637ad3b5a5cfa8ec1e97c30c3de9efe5cac59b /indra/newview/llfloateruipreview.cpp
parent7f83000ea13bac5b4cccb9a6f12e764ac8d69b2a (diff)
parent4ad357ec70e15afdfe78816990cb23c7ba17619c (diff)
Merge from default branch
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llfloateruipreview.cpp')
-rw-r--r--indra/newview/llfloateruipreview.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index 645f8ef054..c6e12476bd 100644
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -1091,7 +1091,9 @@ void LLFloaterUIPreview::onClickEditFloater()
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());
- if(!CreateProcessA(exe_path.c_str(), args2, NULL, NULL, FALSE, 0, NULL, exe_dir.c_str(), &sinfo, &pinfo))
+ // we don't want the current directory to be the executable directory, since the file path is now relative. By using
+ // NULL for the current directory instead of exe_dir.c_str(), the path to the target file will work.
+ if(!CreateProcessA(exe_path.c_str(), args2, NULL, NULL, FALSE, 0, NULL, NULL, &sinfo, &pinfo))
{
// DWORD dwErr = GetLastError();
std::string warning = "Creating editor process failed!";