mirror of
https://github.com/KingDuckZ/dindexer.git
synced 2025-08-18 15:29:48 +00:00
Fix various problems introduced in scan with the last commit.
Fixes a crash due to an assertion trying to access a past-the-end iterator. Gets content type detection to work, although only after hashing is done (see comment in main.cpp for details). Fixes a problem with the array passed to guess_content_type being not sorted as the function expects. Adds more assertions.
This commit is contained in:
parent
22614432a9
commit
be9fc3eb0b
7 changed files with 93 additions and 10 deletions
|
@ -25,6 +25,7 @@
|
|||
#include <memory>
|
||||
#include <type_traits>
|
||||
#include <ciso646>
|
||||
#include <cstdint>
|
||||
|
||||
namespace mchlib {
|
||||
namespace implem {
|
||||
|
@ -146,6 +147,10 @@ namespace mchlib {
|
|||
std::size_t size ( void ) const;
|
||||
std::size_t files_count ( void ) const;
|
||||
std::size_t dir_count ( void ) const;
|
||||
const ListType& sorted_list ( void ) const;
|
||||
|
||||
static void sort_list ( ListType& parList );
|
||||
static ListType::iterator lower_bound ( ListType& parList, const char* parPath, uint16_t parLevel, bool parIsDir );
|
||||
|
||||
private:
|
||||
ListType m_list;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue