Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Testicular Slingshot
Alchemy Viewer
Commits
a9a21ecf
Commit
a9a21ecf
authored
12 years ago
by
Aura Linden
Browse files
Options
Downloads
Patches
Plain Diff
Switched mkTempDir back to using apple standard tempdir behavior instead of /tmp
parent
b6abf5c0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/mac_updater/MacUpdaterAppDelegate.mm
+23
-0
23 additions, 0 deletions
indra/mac_updater/MacUpdaterAppDelegate.mm
indra/mac_updater/mac_updater.cpp
+0
-14
0 additions, 14 deletions
indra/mac_updater/mac_updater.cpp
with
23 additions
and
14 deletions
indra/mac_updater/MacUpdaterAppDelegate.mm
+
23
−
0
View file @
a9a21ecf
...
...
@@ -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
];
...
...
This diff is collapsed.
Click to expand it.
indra/mac_updater/mac_updater.cpp
+
0
−
14
View file @
a9a21ecf
...
...
@@ -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 */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment