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
b8f4ee2e
Commit
b8f4ee2e
authored
Nov 11, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Leverage FromWide
parent
5d7f0d78
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
modules/access_filter/timeshift.c
modules/access_filter/timeshift.c
+7
-10
No files found.
modules/access_filter/timeshift.c
View file @
b8f4ee2e
...
...
@@ -566,26 +566,23 @@ static char *GetTmpFilePath( access_t *p_access )
#ifdef WIN32
DWORD
ret
=
GetTempPathW
(
0
,
NULL
);
wchar_t
wdir
[
ret
+
3
];
// can at least old "C:" + nul
wchar_t
*
pwdir
=
wdir
,
pwdir_free
=
NULL
;
const
wchar_t
*
pwdir
=
wdir
;
wchar_t
*
pwdir_free
=
NULL
;
if
(
GetTempPathW
(
ret
+
1
,
wdir
)
==
0
)
{
pwdir_free
=
pwdir
=
_wgetcwd
(
NULL
,
0
);
if
(
pwdir
==
NULL
)
wcscpy
(
wdir
,
L"C:"
)
;
pwdir
=
L"C:"
;
}
ret
=
WideCharToMultiByte
(
CP_UTF8
,
0
,
pwdir
,
-
1
,
NULL
,
0
);
char
mbdir
[
ret
];
WideCharToMultiByte
(
CP_UTF8
,
0
,
pwdir
,
-
1
,
mbdir
,
ret
);
psz_dir
=
FromWide
(
pwdir
);
if
(
pwdir_free
!=
NULL
)
free
(
pwdir_free
);
/* remove last \\ if any */
if
(
mbdir
[
strlen
(
mbdir
)
-
1
]
==
'\\'
)
mbdir
[
strlen
(
mbdit
)
-
1
]
=
'\0'
;
psz_dir
=
strdup
(
mbdir
);
/* remove trailing antislash if any */
if
(
mbdir
[
strlen
(
psz_dir
)
-
1
]
==
'\\'
)
mbdir
[
strlen
(
psz_dir
)
-
1
]
=
'\0'
;
#else
psz_dir
=
strdup
(
"/tmp"
);
#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