Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
c0995c2c
Commit
c0995c2c
authored
Jun 30, 2005
by
Michael Jung
Committed by
Alexandre Julliard
Jun 30, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix two more corner cases in UNIXFS_get_unix_path and UNIXFS_path_to_pidl.
parent
83245092
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
shfldr_unixfs.c
dlls/shell32/shfldr_unixfs.c
+17
-3
No files found.
dlls/shell32/shfldr_unixfs.c
View file @
c0995c2c
...
...
@@ -280,11 +280,17 @@ static BOOL UNIXFS_get_unix_path(LPCWSTR pszDosPath, char *pszCanonicalPath)
if
(
cLinkLen
+
cTailLen
+
1
>
FILENAME_MAX
)
return
FALSE
;
/* Avoid double slashes. */
if
(
szSymlink
[
cLinkLen
-
1
]
==
'/'
&&
pPathTail
[
0
]
==
'/'
)
{
szSymlink
[
cLinkLen
-
1
]
=
'\0'
;
cLinkLen
--
;
}
memcpy
(
szSymlink
+
cLinkLen
,
pPathTail
,
cTailLen
+
1
);
memcpy
(
szPath
,
szSymlink
,
cLinkLen
+
cTailLen
+
1
);
*
pszCanonicalPath
=
'\0'
;
pCanonicalTail
=
pszCanonicalPath
;
pPathTail
=
szPath
;
pCanonicalTail
=
pszCanonicalPath
;
pPathTail
=
szPath
;
}
else
{
/* Relative link. Expand into szPath and continue. */
char
szTemp
[
FILENAME_MAX
];
...
...
@@ -307,7 +313,7 @@ static BOOL UNIXFS_get_unix_path(LPCWSTR pszDosPath, char *pszCanonicalPath)
pCanonicalTail
+=
pPathTail
-
pElement
;
*
pPathTail
=
cTemp
;
}
}
while
(
pPathTail
[
0
]
==
'/'
&&
pPathTail
[
1
]);
/* Also handles paths terminated by '/' */
}
while
(
pPathTail
[
0
]
==
'/'
);
TRACE
(
"--> %s
\n
"
,
debugstr_a
(
pszCanonicalPath
));
...
...
@@ -440,6 +446,14 @@ static BOOL UNIXFS_path_to_pidl(UnixFolder *pUnixFolder, const WCHAR *path, LPIT
}
}
/* Special case for the root folder. */
if
(
!
strcmp
(
szCompletePath
,
"/"
))
{
*
ppidl
=
pidl
=
(
LPITEMIDLIST
)
SHAlloc
(
sizeof
(
USHORT
));
if
(
!
pidl
)
return
FALSE
;
pidl
->
mkid
.
cb
=
0
;
/* Terminate the ITEMIDLIST */
return
TRUE
;
}
/* Remove trailing slash, if present */
cPathLen
=
strlen
(
szCompletePath
);
if
(
szCompletePath
[
cPathLen
-
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