Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
asapo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
Contributor 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
Joao Alvim Oliveira Dias De Almeida
asapo
Commits
d00f23a7
Commit
d00f23a7
authored
7 years ago
by
Carsten Patzke
Browse files
Options
Downloads
Patches
Plain Diff
Fixed windows build
parent
49ce5a2d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
common/cpp/include/system_wrappers/io.h
+1
-1
1 addition, 1 deletion
common/cpp/include/system_wrappers/io.h
common/cpp/src/system_io/system_io_windows.cpp
+11
-11
11 additions, 11 deletions
common/cpp/src/system_io/system_io_windows.cpp
with
12 additions
and
12 deletions
common/cpp/include/system_wrappers/io.h
+
1
−
1
View file @
d00f23a7
...
...
@@ -15,7 +15,7 @@ namespace hidra2 {
enum
class
IOErrorType
{
kUnknownError
,
kUnknownError
,
//TODO Rename to kUnknownIOError
kBadFileNumber
,
kResourceTemporarilyUnavailable
,
kFileNotFound
,
...
...
This diff is collapsed.
Click to expand it.
common/cpp/src/system_io/system_io_windows.cpp
+
11
−
11
View file @
d00f23a7
...
...
@@ -23,24 +23,24 @@ Error IOErrorFromGetLastError() {
return
nullptr
;
case
ERROR_PATH_NOT_FOUND
:
case
ERROR_FILE_NOT_FOUND
:
return
IOErrorTemplate
::
kFileNotFound
.
Copy
();
return
IOErrorTemplate
s
::
kFileNotFound
.
Generate
();
case
ERROR_ACCESS_DENIED
:
return
IOErrorTemplate
::
kPermissionDenied
.
Copy
();
return
IOErrorTemplate
s
::
kPermissionDenied
.
Generate
();
case
ERROR_CONNECTION_REFUSED
:
return
IOErrorTemplate
::
kConnectionRefused
.
Copy
();
return
IOErrorTemplate
s
::
kConnectionRefused
.
Generate
();
case
WSAEFAULT
:
return
IOErrorTemplate
::
kInvalidMemoryAddress
.
Copy
();
return
IOErrorTemplate
s
::
kInvalidMemoryAddress
.
Generate
();
case
WSAECONNRESET
:
return
IOErrorTemplate
::
kConnectionResetByPeer
.
Copy
();
return
IOErrorTemplate
s
::
kConnectionResetByPeer
.
Generate
();
case
WSAENOTSOCK
:
return
IOErrorTemplate
::
kSocketOperationOnNonSocket
.
Copy
();
return
IOErrorTemplate
s
::
kSocketOperationOnNonSocket
.
Generate
();
case
WSAEWOULDBLOCK
:
return
IOErrorTemplate
::
kResourceTemporarilyUnavailable
.
Copy
();
return
IOErrorTemplate
s
::
kResourceTemporarilyUnavailable
.
Generate
();
case
WSAECONNREFUSED
:
return
IOErrorTemplate
::
kConnectionRefused
.
Copy
();
return
IOErrorTemplate
s
::
kConnectionRefused
.
Generate
();
default:
std
::
cout
<<
"[IOErrorFromGetLastError] Unknown error code: "
<<
last_error
<<
std
::
endl
;
Error
err
=
IOErrorTemplate
::
kUnknownError
.
Copy
();
Error
err
=
IOErrorTemplate
s
::
kUnknownError
.
Generate
();
(
*
err
).
Append
(
"Unknown error code: "
+
std
::
to_string
(
errno
));
return
err
;
}
...
...
@@ -150,7 +150,7 @@ void ProcessFileEntity(const WIN32_FIND_DATA& f, const std::string& path,
files
->
push_back
(
file_info
);
}
void
SystemIO
::
CollectFileInformationRecursivly
(
const
std
::
string
&
path
,
void
SystemIO
::
CollectFileInformationRecursiv
e
ly
(
const
std
::
string
&
path
,
FileInfos
*
files
,
Error
*
err
)
const
{
WIN32_FIND_DATA
find_data
;
HANDLE
handle
=
FindFirstFile
((
path
+
"
\\
*.*"
).
c_str
(),
&
find_data
);
...
...
@@ -162,7 +162,7 @@ void SystemIO::CollectFileInformationRecursivly(const std::string& path,
do
{
if
(
IsDirectory
(
find_data
))
{
CollectFileInformationRecursivly
(
path
+
"
\\
"
+
find_data
.
cFileName
,
files
,
err
);
CollectFileInformationRecursiv
e
ly
(
path
+
"
\\
"
+
find_data
.
cFileName
,
files
,
err
);
}
else
{
ProcessFileEntity
(
find_data
,
path
,
files
,
err
);
}
...
...
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