Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
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
Hide 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:"
)
;
p
wdir
=
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