diff options
author | Kent Quirk <q@lindenlab.com> | 2010-02-01 16:40:29 -0500 |
---|---|---|
committer | Kent Quirk <q@lindenlab.com> | 2010-02-01 16:40:29 -0500 |
commit | acc33dfe75f3667f6478bac00c2a634e2605f851 (patch) | |
tree | 55e2968cb121b1ab6d84fccead619a47a7203784 /indra/newview/llfloateruipreview.cpp | |
parent | 1397781c10b42cfe45e6a7878d6975fc5ac1ac02 (diff) |
DEV-45525 - don't change the current directory before running the text editor
Diffstat (limited to 'indra/newview/llfloateruipreview.cpp')
-rw-r--r-- | indra/newview/llfloateruipreview.cpp | 4 |
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!"; |