mirror of
https://github.com/KingDuckZ/dindexer.git
synced 2025-07-03 14:14:11 +00:00
Fix scan hanging after listing directories.
This commit is contained in:
parent
fd333a1c00
commit
9f3b27f0b5
2 changed files with 3 additions and 1 deletions
|
@ -73,7 +73,7 @@ namespace mchlib {
|
||||||
#if defined(INDEXER_VERBOSE)
|
#if defined(INDEXER_VERBOSE)
|
||||||
std::cout << "Making initial hash for " << parCurrDir << "...\n";
|
std::cout << "Making initial hash for " << parCurrDir << "...\n";
|
||||||
#endif
|
#endif
|
||||||
curr_entry.mime_full = parMime.analyze(it_entry->abs_path);
|
curr_entry.mime_full = parMime.analyze(curr_entry.abs_path);
|
||||||
while (parEnd != it_entry and it_entry->level == curr_entry_it->level + 1 and parCurrDir == PathName(it_entry->abs_path).pop_right()) {
|
while (parEnd != it_entry and it_entry->level == curr_entry_it->level + 1 and parCurrDir == PathName(it_entry->abs_path).pop_right()) {
|
||||||
PathName curr_subdir(it_entry->abs_path);
|
PathName curr_subdir(it_entry->abs_path);
|
||||||
if (it_entry->is_directory) {
|
if (it_entry->is_directory) {
|
||||||
|
|
|
@ -56,6 +56,8 @@ namespace mchlib {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* MimeType::analyze (const std::string& parPath) {
|
const char* MimeType::analyze (const std::string& parPath) {
|
||||||
|
assert(not parPath.empty());
|
||||||
|
assert(parPath.c_str());
|
||||||
if (initialized()) {
|
if (initialized()) {
|
||||||
const auto cookie = m_local_data->magic_cookie.get();
|
const auto cookie = m_local_data->magic_cookie.get();
|
||||||
const auto retval = magic_file(cookie, parPath.c_str());
|
const auto retval = magic_file(cookie, parPath.c_str());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue