Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
6a69f95c
Commit
6a69f95c
authored
Aug 26, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Win32: fix
file://localhost/
... to path conversion
Pointed-out-by: Michael A. Puls II
parent
806505a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
src/text/strings.c
src/text/strings.c
+14
-13
No files found.
src/text/strings.c
View file @
6a69f95c
...
...
@@ -1206,23 +1206,24 @@ char *make_path (const char *url)
if
(
schemelen
==
4
&&
!
strncasecmp
(
url
,
"file"
,
4
))
{
#if (DIR_SEP_CHAR != '/')
for
(
char
*
p
=
strchr
(
path
,
'/'
);
p
;
p
=
strchr
(
p
+
1
,
'/'
))
*
p
=
DIR_SEP_CHAR
;
#endif
/* Leading slash => local path */
if
(
*
path
==
DIR_SEP_CHAR
)
#if (!defined (WIN32) && !defined (__OS2__)) || defined (UNDER_CE)
/* Leading slash => local path */
if
(
*
path
==
'/'
)
return
path
;
#else
return
memmove
(
path
,
path
+
1
,
strlen
(
path
+
1
)
+
1
);
#endif
/* Local path disguised as a remote one (MacOS X) */
if
(
!
strncasecmp
(
path
,
"localhost"
DIR_SEP
,
10
))
/* Local path disguised as a remote one */
if
(
!
strncasecmp
(
path
,
"localhost/"
,
10
))
return
memmove
(
path
,
path
+
9
,
strlen
(
path
+
9
)
+
1
);
#else
for
(
char
*
p
=
strchr
(
path
,
'/'
);
p
;
p
=
strchr
(
p
+
1
,
'/'
))
*
p
=
'\\'
;
#if defined( WIN32 ) || defined( __OS2__ )
/* Leading backslash => local path */
if
(
*
path
==
'\\'
)
return
memmove
(
path
,
path
+
1
,
strlen
(
path
+
1
)
+
1
);
/* Local path disguised as a remote one */
if
(
!
strncasecmp
(
path
,
"localhost
\\
"
,
10
))
return
memmove
(
path
,
path
+
10
,
strlen
(
path
+
10
)
+
1
);
/* UNC path */
if
(
*
path
&&
asprintf
(
&
ret
,
"
\\\\
%s"
,
path
)
==
-
1
)
ret
=
NULL
;
#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