diff options
author | Jacek Antonelli | 2008-08-15 23:45:04 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:04 -0500 |
commit | 117e22047c5752352342d64e3fb7ce00a4eb8113 (patch) | |
tree | e32de2cfba0dda8705ae528fcd1fbe23ba075685 /linden/indra/llvfs/lldir_linux.cpp | |
parent | Second Life viewer sources 1.18.0.6 (diff) | |
download | meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.zip meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.gz meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.bz2 meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.xz |
Second Life viewer sources 1.18.1.2
Diffstat (limited to 'linden/indra/llvfs/lldir_linux.cpp')
-rw-r--r-- | linden/indra/llvfs/lldir_linux.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/linden/indra/llvfs/lldir_linux.cpp b/linden/indra/llvfs/lldir_linux.cpp index e3aada6..7cf1c2a 100644 --- a/linden/indra/llvfs/lldir_linux.cpp +++ b/linden/indra/llvfs/lldir_linux.cpp | |||
@@ -75,7 +75,16 @@ LLDir_Linux::LLDir_Linux() | |||
75 | mDirp = NULL; | 75 | mDirp = NULL; |
76 | 76 | ||
77 | char tmp_str[LL_MAX_PATH]; /* Flawfinder: ignore */ | 77 | char tmp_str[LL_MAX_PATH]; /* Flawfinder: ignore */ |
78 | getcwd(tmp_str, LL_MAX_PATH); | 78 | if (getcwd(tmp_str, LL_MAX_PATH) == NULL) |
79 | { | ||
80 | strcpy(tmp_str, "/tmp"); | ||
81 | llwarns << "Could not get current directory; changing to " | ||
82 | << tmp_str << llendl; | ||
83 | if (chdir(tmp_str) == -1) | ||
84 | { | ||
85 | llerrs << "Could not change directory to " << tmp_str << llendl; | ||
86 | } | ||
87 | } | ||
79 | 88 | ||
80 | mExecutableFilename = ""; | 89 | mExecutableFilename = ""; |
81 | mExecutablePathAndName = ""; | 90 | mExecutablePathAndName = ""; |
@@ -328,7 +337,11 @@ void LLDir_Linux::getRandomFileInDir(const std::string &dirname, const std::stri | |||
328 | std::string LLDir_Linux::getCurPath() | 337 | std::string LLDir_Linux::getCurPath() |
329 | { | 338 | { |
330 | char tmp_str[LL_MAX_PATH]; /* Flawfinder: ignore */ | 339 | char tmp_str[LL_MAX_PATH]; /* Flawfinder: ignore */ |
331 | getcwd(tmp_str, LL_MAX_PATH); | 340 | if (getcwd(tmp_str, LL_MAX_PATH) == NULL) |
341 | { | ||
342 | llwarns << "Could not get current directory" << llendl; | ||
343 | tmp_str[0] = '\0'; | ||
344 | } | ||
332 | return tmp_str; | 345 | return tmp_str; |
333 | } | 346 | } |
334 | 347 | ||