Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
a700fc7a
Commit
a700fc7a
authored
5 years ago
by
Laszlo Csomor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove shortpath-related code from ExpandWildcards
parent
ef3df0e8
master
v3.11.4
v3.11.3
v3.11.2
v3.11.1
v3.11.0
v3.11.0-rc2
v3.11.0-rc1
v3.10.1
v3.10.0
v3.10.0-rc1
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
36 deletions
+0
-36
io_win32.cc
src/google/protobuf/io/io_win32.cc
+0
-36
No files found.
src/google/protobuf/io/io_win32.cc
View file @
a700fc7a
...
...
@@ -370,8 +370,6 @@ ExpandWildcardsResult ExpandWildcards(
return
ExpandWildcardsResult
::
kSuccess
;
}
#ifdef SUPPORT_LONGPATHS
wstring
wpath
;
if
(
!
as_windows_path
(
path
.
c_str
(),
&
wpath
))
{
return
ExpandWildcardsResult
::
kErrorInputPathConversion
;
...
...
@@ -412,40 +410,6 @@ ExpandWildcardsResult ExpandWildcards(
}
while
(
::
FindNextFileW
(
handle
,
&
metadata
));
FindClose
(
handle
);
return
matched
;
#else // not SUPPORT_LONGPATHS
static
const
string
kDot
=
"."
;
static
const
string
kDotDot
=
".."
;
WIN32_FIND_DATAA
metadata
;
HANDLE
handle
=
::
FindFirstFileA
(
path
.
c_str
(),
&
metadata
);
if
(
handle
==
INVALID_HANDLE_VALUE
)
{
// The pattern does not match any files (or directories).
return
ExpandWildcardsResult
::
kErrorNoMatchingFile
;
}
string
::
size_type
pos
=
path
.
find_last_of
(
"
\\
/"
);
string
dirname
;
if
(
pos
!=
string
::
npos
)
{
dirname
=
path
.
substr
(
0
,
pos
+
1
);
}
ExpandWildcardsResult
matched
=
ExpandWildcardsResult
::
kErrorNoMatchingFile
;
do
{
// Ignore ".", "..", and directories.
if
((
metadata
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
==
0
&&
kDot
!=
metadata
.
cFileName
&&
kDotDot
!=
metadata
.
cFileName
)
{
matched
=
ExpandWildcardsResult
::
kSuccess
;
if
(
!
dirname
.
empty
())
{
consume
(
dirname
+
metadata
.
cFileName
);
}
else
{
consume
(
metadata
.
cFileName
);
}
}
}
while
(
::
FindNextFileA
(
handle
,
&
metadata
));
FindClose
(
handle
);
return
matched
;
#endif // SUPPORT_LONGPATHS
}
namespace
strings
{
...
...
This diff is collapsed.
Click to expand it.
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