Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johnny Cai
wine
Commits
bb9e66e2
Commit
bb9e66e2
authored
24 years ago
by
Dave Hawkes
Committed by
Alexandre Julliard
24 years ago
Browse files
Options
Downloads
Patches
Plain Diff
If whitespace or dots are appended to the end of any component in a
path then it should be ignored.
parent
596921da
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
files/dos_fs.c
+7
-2
7 additions, 2 deletions
files/dos_fs.c
with
7 additions
and
2 deletions
files/dos_fs.c
+
7
−
2
View file @
bb9e66e2
...
...
@@ -530,8 +530,8 @@ BOOL DOSFS_FindUnixName( LPCSTR path, LPCSTR name, LPSTR long_buf,
const
char
*
p
=
strchr
(
name
,
'/'
);
int
len
=
p
?
(
int
)(
p
-
name
)
:
strlen
(
name
);
if
((
p
=
strchr
(
name
,
'\\'
)))
len
=
min
(
(
int
)(
p
-
name
),
len
);
/* Ignore trailing dots */
while
(
len
>
1
&&
name
[
len
-
1
]
==
'.'
)
len
--
;
/* Ignore trailing dots
and spaces
*/
while
(
len
>
1
&&
(
name
[
len
-
1
]
==
'.'
||
name
[
len
-
1
]
==
' '
)
)
len
--
;
if
(
long_len
<
len
+
1
)
return
FALSE
;
TRACE
(
"%s,%s
\n
"
,
path
,
name
);
...
...
@@ -855,6 +855,11 @@ BOOL DOSFS_GetFullName( LPCSTR name, BOOL check_last, DOS_FULL_NAME *full )
else
*
p_l
++
=
*
name
;
name
++
;
}
/* Ignore trailing dots and spaces */
while
(
p_l
[
-
1
]
==
'.'
||
p_l
[
-
1
]
==
' '
)
{
--
p_l
;
--
p_s
;
}
*
p_l
=
*
p_s
=
'\0'
;
}
while
((
*
name
==
'\\'
)
||
(
*
name
==
'/'
))
name
++
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment