Merge tag 'v0.20.7'
release v0.20.7
This commit is contained in:
@@ -56,7 +56,7 @@ InotifyQueue::OnTimeout()
|
||||
|
||||
gcc_pure
|
||||
static bool
|
||||
path_in(const char *path, const char *possible_parent)
|
||||
path_in(const char *path, const char *possible_parent) noexcept
|
||||
{
|
||||
if (StringIsEmpty(path))
|
||||
return true;
|
||||
|
||||
@@ -62,10 +62,10 @@ struct WatchDirectory {
|
||||
WatchDirectory &operator=(const WatchDirectory &) = delete;
|
||||
|
||||
gcc_pure
|
||||
unsigned GetDepth() const;
|
||||
unsigned GetDepth() const noexcept;
|
||||
|
||||
gcc_pure
|
||||
AllocatedPath GetUriFS() const;
|
||||
AllocatedPath GetUriFS() const noexcept;
|
||||
};
|
||||
|
||||
static InotifySource *inotify_source;
|
||||
@@ -132,7 +132,7 @@ remove_watch_directory(WatchDirectory *directory)
|
||||
}
|
||||
|
||||
AllocatedPath
|
||||
WatchDirectory::GetUriFS() const
|
||||
WatchDirectory::GetUriFS() const noexcept
|
||||
{
|
||||
if (parent == nullptr)
|
||||
return AllocatedPath::Null();
|
||||
@@ -225,7 +225,7 @@ recursive_watch_subdirectories(WatchDirectory *directory,
|
||||
|
||||
gcc_pure
|
||||
unsigned
|
||||
WatchDirectory::GetDepth() const
|
||||
WatchDirectory::GetDepth() const noexcept
|
||||
{
|
||||
const WatchDirectory *d = this;
|
||||
unsigned depth = 0;
|
||||
@@ -331,7 +331,7 @@ mpd_inotify_init(EventLoop &loop, Storage &storage, UpdateService &update,
|
||||
}
|
||||
|
||||
void
|
||||
mpd_inotify_finish(void)
|
||||
mpd_inotify_finish(void) noexcept
|
||||
{
|
||||
if (inotify_source == nullptr)
|
||||
return;
|
||||
|
||||
@@ -32,6 +32,6 @@ mpd_inotify_init(EventLoop &loop, Storage &storage, UpdateService &update,
|
||||
unsigned max_depth);
|
||||
|
||||
void
|
||||
mpd_inotify_finish();
|
||||
mpd_inotify_finish() noexcept;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <errno.h>
|
||||
|
||||
bool
|
||||
GetInfo(Storage &storage, const char *uri_utf8, StorageFileInfo &info)
|
||||
GetInfo(Storage &storage, const char *uri_utf8, StorageFileInfo &info) noexcept
|
||||
try {
|
||||
info = storage.GetInfo(uri_utf8, true);
|
||||
return true;
|
||||
@@ -42,7 +42,7 @@ try {
|
||||
}
|
||||
|
||||
bool
|
||||
GetInfo(StorageDirectoryReader &reader, StorageFileInfo &info)
|
||||
GetInfo(StorageDirectoryReader &reader, StorageFileInfo &info) noexcept
|
||||
try {
|
||||
info = reader.GetInfo(true);
|
||||
return true;
|
||||
@@ -52,7 +52,7 @@ try {
|
||||
}
|
||||
|
||||
bool
|
||||
DirectoryExists(Storage &storage, const Directory &directory)
|
||||
DirectoryExists(Storage &storage, const Directory &directory) noexcept
|
||||
{
|
||||
StorageFileInfo info;
|
||||
|
||||
@@ -79,7 +79,7 @@ GetDirectoryChildInfo(Storage &storage, const Directory &directory,
|
||||
|
||||
bool
|
||||
directory_child_is_regular(Storage &storage, const Directory &directory,
|
||||
const char *name_utf8)
|
||||
const char *name_utf8) noexcept
|
||||
try {
|
||||
return GetDirectoryChildInfo(storage, directory, name_utf8)
|
||||
.IsRegular();
|
||||
@@ -89,7 +89,7 @@ try {
|
||||
|
||||
bool
|
||||
directory_child_access(Storage &storage, const Directory &directory,
|
||||
const char *name, int mode)
|
||||
const char *name, int mode) noexcept
|
||||
{
|
||||
#ifdef WIN32
|
||||
/* CheckAccess() is useless on WIN32 */
|
||||
|
||||
@@ -33,23 +33,23 @@ class StorageDirectoryReader;
|
||||
* returning them.
|
||||
*/
|
||||
bool
|
||||
GetInfo(Storage &storage, const char *uri_utf8, StorageFileInfo &info);
|
||||
GetInfo(Storage &storage, const char *uri_utf8, StorageFileInfo &info) noexcept;
|
||||
|
||||
/**
|
||||
* Wrapper for LocalDirectoryReader::GetInfo() that logs errors
|
||||
* instead of returning them.
|
||||
*/
|
||||
bool
|
||||
GetInfo(StorageDirectoryReader &reader, StorageFileInfo &info);
|
||||
GetInfo(StorageDirectoryReader &reader, StorageFileInfo &info) noexcept;
|
||||
|
||||
gcc_pure
|
||||
bool
|
||||
DirectoryExists(Storage &storage, const Directory &directory);
|
||||
DirectoryExists(Storage &storage, const Directory &directory) noexcept;
|
||||
|
||||
gcc_pure
|
||||
bool
|
||||
directory_child_is_regular(Storage &storage, const Directory &directory,
|
||||
const char *name_utf8);
|
||||
const char *name_utf8) noexcept;
|
||||
|
||||
/**
|
||||
* Checks if the given permissions on the mapped file are given.
|
||||
@@ -57,6 +57,6 @@ directory_child_is_regular(Storage &storage, const Directory &directory,
|
||||
gcc_pure
|
||||
bool
|
||||
directory_child_access(Storage &storage, const Directory &directory,
|
||||
const char *name, int mode);
|
||||
const char *name, int mode) noexcept;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -248,7 +248,7 @@ try {
|
||||
/* we don't look at "." / ".." nor files with newlines in their name */
|
||||
gcc_pure
|
||||
static bool
|
||||
skip_path(const char *name_utf8)
|
||||
skip_path(const char *name_utf8) noexcept
|
||||
{
|
||||
return strchr(name_utf8, '\n') != nullptr;
|
||||
}
|
||||
@@ -256,7 +256,7 @@ skip_path(const char *name_utf8)
|
||||
gcc_pure
|
||||
bool
|
||||
UpdateWalk::SkipSymlink(const Directory *directory,
|
||||
const char *utf8_name) const
|
||||
const char *utf8_name) const noexcept
|
||||
{
|
||||
#ifndef WIN32
|
||||
const auto path_fs = storage.MapChildFS(directory->GetPath(),
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
private:
|
||||
gcc_pure
|
||||
bool SkipSymlink(const Directory *directory,
|
||||
const char *utf8_name) const;
|
||||
const char *utf8_name) const noexcept;
|
||||
|
||||
void RemoveExcludedFromDirectory(Directory &directory,
|
||||
const ExcludeList &exclude_list);
|
||||
|
||||
Reference in New Issue
Block a user