Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
b8433e0d
Commit
b8433e0d
authored
Nov 01, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support filenames outside the ANSI Code Page
parent
11566f0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
8 deletions
+26
-8
modules/access/file.c
modules/access/file.c
+26
-8
No files found.
modules/access/file.c
View file @
b8433e0d
...
...
@@ -445,17 +445,35 @@ static int open_file (access_t *p_access, const char *psz_name)
p_access
->
info
.
i_update
|=
INPUT_UPDATE_SIZE
;
fseek
(
p_sys
->
fd
,
0
,
SEEK_SET
);
#else
const
char
*
psz_localname
=
ToLocale
(
path
);
if
(
psz_localname
==
NULL
)
int
fd
=
-
1
;
# if defined (WIN32)
if
(
GetVersion
()
<
0x80000000
)
{
msg_Err
(
p_access
,
"incorrect file name %s"
,
psz_name
);
free
(
path
);
return
-
1
;
/* for Windows NT and above */
wchar_t
wpath
[
MAX_PATH
+
1
];
if
(
!
MultiByteToWideChar
(
CP_UTF8
,
0
,
path
,
-
1
,
wpath
,
MAX_PATH
))
{
msg_Err
(
p_access
,
"incorrect file name %s"
,
psz_name
);
return
VLC_EGENERIC
;
}
wpath
[
MAX_PATH
]
=
L'\0'
;
fd
=
_wopen
(
wpath
,
O_NONBLOCK
);
}
else
# endif
{
const
char
*
psz_localname
=
ToLocale
(
path
);
if
(
psz_localname
==
NULL
)
{
msg_Err
(
p_access
,
"incorrect file name %s"
,
psz_name
);
free
(
path
);
return
-
1
;
}
// FIXME: support non-ANSI filenames on Win32
int
fd
=
open
(
path
,
O_NONBLOCK
/*| O_LARGEFILE*/
);
LocaleFree
(
psz_localname
);
fd
=
open
(
path
,
O_NONBLOCK
/*| O_LARGEFILE*/
);
LocaleFree
(
psz_localname
);
}
free
(
path
);
if
(
fd
==
-
1
)
...
...
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