Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
27cb7a2e
Commit
27cb7a2e
authored
Jun 13, 2015
by
Erwan Tulou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skins2(Linux): replace tempnam() with mkdtemp()
Linux manual strongly advises against using tempnam().
parent
5e3c93f1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
15 deletions
+13
-15
modules/gui/skins2/src/theme_loader.cpp
modules/gui/skins2/src/theme_loader.cpp
+13
-15
No files found.
modules/gui/skins2/src/theme_loader.cpp
View file @
27cb7a2e
...
...
@@ -817,29 +817,27 @@ string ThemeLoader::getTmpDir( )
{
#if defined( _WIN32 )
wchar_t
*
tmpdir
=
_wtempnam
(
NULL
,
L"vlt"
);
#else
char
*
tmpdir
=
tempnam
(
NULL
,
"vlt"
);
#endif
if
(
tmpdir
==
NULL
)
return
""
;
#if defined( _WIN32 )
char
*
utf8
=
FromWide
(
tmpdir
);
if
(
utf8
==
NULL
)
{
free
(
tmpdir
);
return
""
;
}
string
tempPath
(
utf8
);
string
tempPath
(
utf8
?
utf8
:
""
);
free
(
utf8
);
return
tempPath
;
#elif defined( __OS2__ )
char
*
tmpdir
=
tempnam
(
NULL
,
"vlt"
);
if
(
tmpdir
==
NULL
)
return
""
;
string
tempPath
(
sFromLocale
(
tmpdir
));
#else
string
tempPath
(
tmpdir
);
#endif
free
(
tmpdir
);
return
tempPath
;
#else
char
templ
[]
=
"/tmp/vltXXXXXX"
;
char
*
tmpdir
=
mkdtemp
(
templ
);
return
string
(
tmpdir
?
tmpdir
:
""
);
#endif
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment