Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Иван Мажукин
mpd
Commits
896015bf
Commit
896015bf
authored
May 05, 2013
by
Denis Krjuchkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DirectoryReader: rename Failed() to HasFailed() for consistency with TextFile
parent
df3e7a92
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
Mapper.cxx
src/Mapper.cxx
+1
-1
DirectoryReader.hxx
src/fs/DirectoryReader.hxx
+4
-4
No files found.
src/Mapper.cxx
View file @
896015bf
...
...
@@ -100,7 +100,7 @@ check_directory(const char *path_utf8, const Path &path_fs)
#endif
const
DirectoryReader
reader
(
path_fs
);
if
(
reader
.
Failed
()
&&
errno
==
EACCES
)
if
(
reader
.
Has
Failed
()
&&
errno
==
EACCES
)
g_warning
(
"No permission to read directory: %s"
,
path_utf8
);
}
...
...
src/fs/DirectoryReader.hxx
View file @
896015bf
...
...
@@ -47,14 +47,14 @@ public:
* Destroys this instance.
*/
~
DirectoryReader
()
{
if
(
!
Failed
())
if
(
!
Has
Failed
())
closedir
(
dirp
);
}
/**
* Checks if directory failed to open.
*/
bool
Failed
()
const
{
bool
Has
Failed
()
const
{
return
dirp
==
nullptr
;
}
...
...
@@ -62,7 +62,7 @@ public:
* Checks if directory entry is available.
*/
bool
HasEntry
()
const
{
assert
(
!
Failed
());
assert
(
!
Has
Failed
());
return
ent
!=
nullptr
;
}
...
...
@@ -70,7 +70,7 @@ public:
* Reads next directory entry.
*/
bool
ReadEntry
()
{
assert
(
!
Failed
());
assert
(
!
Has
Failed
());
ent
=
readdir
(
dirp
);
return
HasEntry
();
}
...
...
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