[DB] Catch permission file errors when updating
This commit is contained in:
@@ -589,6 +589,8 @@ Updater::processDirectory(const boost::filesystem::path& rootDirectory,
|
|||||||
bool
|
bool
|
||||||
Updater::checkFile(const boost::filesystem::path& p, const std::vector<boost::filesystem::path>& rootDirs, const std::vector<boost::filesystem::path>& extensions)
|
Updater::checkFile(const boost::filesystem::path& p, const std::vector<boost::filesystem::path>& rootDirs, const std::vector<boost::filesystem::path>& extensions)
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
bool status = true;
|
bool status = true;
|
||||||
|
|
||||||
// For each track, make sure the the file still exists
|
// For each track, make sure the the file still exists
|
||||||
@@ -624,8 +626,15 @@ Updater::checkFile(const boost::filesystem::path& p, const std::vector<boost::fi
|
|||||||
}
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (boost::filesystem::filesystem_error& e)
|
||||||
|
{
|
||||||
|
LMS_LOG(MOD_DBUPDATER, SEV_ERROR) << "Caught exception while checking file '" << p << "': " << e.what();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Updater::checkAudioFiles( Stats& stats )
|
Updater::checkAudioFiles( Stats& stats )
|
||||||
|
|||||||
Reference in New Issue
Block a user