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
2038620b
Commit
2038620b
authored
Sep 02, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/simple/Directory: add method IsReallyAFile()
parent
5dc7cb87
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
Directory.hxx
src/db/plugins/simple/Directory.hxx
+9
-0
UpdateIO.cxx
src/db/update/UpdateIO.cxx
+1
-2
No files found.
src/db/plugins/simple/Directory.hxx
View file @
2038620b
...
...
@@ -111,6 +111,15 @@ public:
return
new
Directory
(
std
::
string
(),
nullptr
);
}
/**
* Is this really a regular file which is being treated like a
* directory?
*/
bool
IsReallyAFile
()
const
noexcept
{
return
device
==
DEVICE_INARCHIVE
||
device
==
DEVICE_CONTAINER
;
}
bool
IsMount
()
const
noexcept
{
return
mounted_database
!=
nullptr
;
}
...
...
src/db/update/UpdateIO.cxx
View file @
2038620b
...
...
@@ -59,8 +59,7 @@ DirectoryExists(Storage &storage, const Directory &directory) noexcept
return
false
;
}
return
directory
.
device
==
DEVICE_INARCHIVE
||
directory
.
device
==
DEVICE_CONTAINER
return
directory
.
IsReallyAFile
()
?
info
.
IsRegular
()
:
info
.
IsDirectory
();
}
...
...
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