Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
7e44fa82
Commit
7e44fa82
authored
Apr 04, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filename_sanitize: spaces are forbidden only when beginning and ending.
parent
4638fd98
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
src/text/strings.c
src/text/strings.c
+18
-1
No files found.
src/text/strings.c
View file @
7e44fa82
...
@@ -1034,6 +1034,12 @@ char* filename_sanitize( const char *str_origin )
...
@@ -1034,6 +1034,12 @@ char* filename_sanitize( const char *str_origin )
return
str_base
;
return
str_base
;
}
}
#if defined( WIN32 )
// Change leading spaces into underscores
while
(
*
str
&&
*
str
==
' '
)
*
str
++
=
'_'
;
#endif
while
(
*
str
)
while
(
*
str
)
{
{
switch
(
*
str
)
switch
(
*
str
)
...
@@ -1050,12 +1056,23 @@ char* filename_sanitize( const char *str_origin )
...
@@ -1050,12 +1056,23 @@ char* filename_sanitize( const char *str_origin )
case
'|'
:
case
'|'
:
case
'<'
:
case
'<'
:
case
'>'
:
case
'>'
:
case
' '
:
#endif
#endif
*
str
=
'_'
;
*
str
=
'_'
;
}
}
str
++
;
str
++
;
}
}
#if defined( WIN32 )
// Change trailing spaces into underscores
str
--
;
while
(
str
!=
str_base
)
{
if
(
*
str
!=
' '
)
break
;
*
str
--
=
'_'
;
}
#endif
return
str_base
;
return
str_base
;
}
}
...
...
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