WIP. Convert to UTF-8 before DB inserts

This commit is contained in:
emeric
2014-06-25 12:42:52 +02:00
parent ee09a5027a
commit 17662d4eb8
4 changed files with 29 additions and 13 deletions
+12 -7
View File
@@ -240,14 +240,19 @@ Database::refreshAudioDirectory( const boost::filesystem::path& p)
BOOST_FOREACH(const boost::filesystem::path& file, files) {
if (boost::filesystem::is_directory(file)) {
refreshAudioDirectory( file );
try {
if (boost::filesystem::is_directory(file)) {
refreshAudioDirectory( file );
}
else if (boost::filesystem::is_regular(file)) {
processAudioFile( file );
}
else {
std::cout << "Skipped '" << file << "' (not regular)" << std::endl;
}
}
else if (boost::filesystem::is_regular(file)) {
processAudioFile( file );
}
else {
std::cout << "Skipped '" << file << "' (not regular)" << std::endl;
catch(std::exception& e) {
std::cerr << "Exception while accessing '" << file << ": " << e.what() << std::endl;
}
}
}