Main: make inotify errors non-fatal
This commit is contained in:
parent
2d8847f428
commit
1bbe9896f6
19
src/Main.cxx
19
src/Main.cxx
@ -523,13 +523,18 @@ MainConfigured(const struct options &options, const ConfigData &raw_config)
|
|||||||
if (raw_config.GetBool(ConfigOption::AUTO_UPDATE, false)) {
|
if (raw_config.GetBool(ConfigOption::AUTO_UPDATE, false)) {
|
||||||
#ifdef ENABLE_INOTIFY
|
#ifdef ENABLE_INOTIFY
|
||||||
if (instance.storage != nullptr &&
|
if (instance.storage != nullptr &&
|
||||||
instance.update != nullptr)
|
instance.update != nullptr) {
|
||||||
instance.inotify_update =
|
try {
|
||||||
mpd_inotify_init(instance.event_loop,
|
instance.inotify_update =
|
||||||
*instance.storage,
|
mpd_inotify_init(instance.event_loop,
|
||||||
*instance.update,
|
*instance.storage,
|
||||||
raw_config.GetUnsigned(ConfigOption::AUTO_UPDATE_DEPTH,
|
*instance.update,
|
||||||
INT_MAX));
|
raw_config.GetUnsigned(ConfigOption::AUTO_UPDATE_DEPTH,
|
||||||
|
INT_MAX));
|
||||||
|
} catch (...) {
|
||||||
|
LogError(std::current_exception());
|
||||||
|
}
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
LogWarning(config_domain,
|
LogWarning(config_domain,
|
||||||
"inotify: auto_update was disabled. enable during compilation phase");
|
"inotify: auto_update was disabled. enable during compilation phase");
|
||||||
|
Loading…
Reference in New Issue
Block a user