From a9a21ecffa52ad0e53000c4fdd94569c50022889 Mon Sep 17 00:00:00 2001 From: Aura Linden Date: Tue, 18 Dec 2012 13:30:21 -0800 Subject: Switched mkTempDir back to using apple standard tempdir behavior instead of /tmp --- indra/mac_updater/MacUpdaterAppDelegate.mm | 23 +++++++++++++++++++++++ indra/mac_updater/mac_updater.cpp | 14 -------------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/indra/mac_updater/MacUpdaterAppDelegate.mm b/indra/mac_updater/MacUpdaterAppDelegate.mm index b6f95eef7e..4457419a94 100644 --- a/indra/mac_updater/MacUpdaterAppDelegate.mm +++ b/indra/mac_updater/MacUpdaterAppDelegate.mm @@ -124,6 +124,29 @@ void sendProgress(int cur, int max, const std::string str) setProgressText(str); } +bool mkTempDir(boost::filesystem::path& temp_dir) +{ + NSString * tempDir = NSTemporaryDirectory(); + if (tempDir == nil) + tempDir = @"/tmp/"; + + std::string* temp_str = NSToString(tempDir); + *temp_str += std::string("SecondLifeUpdate_XXXXXX"); + + std::cout << "tempDir is " << temp_str << std::endl; + + char temp[PATH_MAX] = ""; /* Flawfinder: ignore */ + strncpy(temp, temp_str->c_str(), temp_str->length()); + + if(mkdtemp(temp) == NULL) + { + return false; + } + + temp_dir = boost::filesystem::path(temp); + + return true; +} bool copyDir(const std::string& src_dir, const std::string& dest_dir) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; diff --git a/indra/mac_updater/mac_updater.cpp b/indra/mac_updater/mac_updater.cpp index fc9565d63d..bc9fec3558 100644 --- a/indra/mac_updater/mac_updater.cpp +++ b/indra/mac_updater/mac_updater.cpp @@ -494,20 +494,6 @@ bool LLMacUpdater::doInstall(const boost::filesystem::path& app_dir, return true; } -bool mkTempDir(boost::filesystem::path& temp_dir) -{ - char temp_str[PATH_MAX] = "/tmp/SecondLifeUpdate_XXXXXX"; - - if(mkdtemp(temp_str) == NULL) - { - return false; - } - - temp_dir = boost::filesystem::path(temp_str); - - return true; -} - void* LLMacUpdater::updatethreadproc(void*) { char tempDir[PATH_MAX] = ""; /* Flawfinder: ignore */ -- cgit v1.2.3 From 213be712b26119832ccc9f04a17c9013792b5044 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 19 Dec 2012 16:52:25 -0500 Subject: tag merge of DRTVWR-270 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 740260312a..84457d6f0e 100755 --- a/.hgtags +++ b/.hgtags @@ -380,3 +380,4 @@ c23d734065ed593b2413385aecd8366d8e0ee96b DRTVWR-257 5cba5f39d0a81d659f24ebc4b5efd025a39e3db1 3.4.3-release 9aa1aa9f1fe13c194695a0b8f0af298296241dc2 DRTVWR-260 18c5f76ac07937e0b64bb874edba0d60a28cec56 DRTVWR-244 +b634dec987c16e8c9c938e11e52591d9ead8fa9b DRTVWR-270 -- cgit v1.2.3 From d8ac1c0f2f05e85a9a85547c0529734fc7d52d30 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 19 Dec 2012 17:49:16 -0500 Subject: Added tag 3.4.4-beta2 for changeset cd39255bd233 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index a00dde6543..0be54334a3 100755 --- a/.hgtags +++ b/.hgtags @@ -386,3 +386,4 @@ b418be80903520c492e1173f3afbc4021cad5d07 DRTVWR-255 18c5f76ac07937e0b64bb874edba0d60a28cec56 DRTVWR-244 083d2d36b5bb1c54fc3dd7caac0e7ac381a9cef0 3.4.4-beta1 b634dec987c16e8c9c938e11e52591d9ead8fa9b DRTVWR-270 +cd39255bd23330fd30c04105f2811e941d8524fe 3.4.4-beta2 -- cgit v1.2.3