diff --git a/src/sequenceParser/ItemStat.cpp b/src/sequenceParser/ItemStat.cpp index 19f057d..d0db961 100644 --- a/src/sequenceParser/ItemStat.cpp +++ b/src/sequenceParser/ItemStat.cpp @@ -82,14 +82,14 @@ void ItemStat::setPermissions( const mode_t& protection ) otherCanExecute = protection & S_IXOTH; } -void ItemStat::setUserName() +void ItemStat::updateUserName() { passwd* user = getpwuid(userId); if(user && user->pw_name) userName = std::string(user->pw_name); } -void ItemStat::setGroupName() +void ItemStat::updateGroupName() { group* group = getgrgid(groupId); if(group && group->gr_name) @@ -126,8 +126,8 @@ void ItemStat::statLink( const boost::filesystem::path& path ) // size on hard-drive (takes hardlinks into account) sizeOnDisk = (statInfos.st_blocks / nbHardLinks) * statInfos.st_blksize; setPermissions(statInfos.st_mode); - setUserName(); - setGroupName(); + updateUserName(); + updateGroupName(); #else fullNbHardLinks = nbHardLinks = 1; #endif @@ -161,8 +161,8 @@ void ItemStat::statFolder( const boost::filesystem::path& path ) maxSize = size; sizeOnDisk = statInfos.st_blocks * statInfos.st_blksize; setPermissions(statInfos.st_mode); - setUserName(); - setGroupName(); + updateUserName(); + updateGroupName(); #endif // size (takes hardlinks into account) @@ -197,8 +197,8 @@ void ItemStat::statFile( const boost::filesystem::path& path ) // size on hard-drive (takes hardlinks into account) sizeOnDisk = (statInfos.st_blocks / nbHardLinks) * statInfos.st_blksize; setPermissions(statInfos.st_mode); - setUserName(); - setGroupName(); + updateUserName(); + updateGroupName(); #endif // size (takes hardlinks into account) @@ -219,8 +219,8 @@ void ItemStat::statSequence( const Item& item, const bool approximative ) groupId = statInfos.st_gid; accessTime = statInfos.st_atime; setPermissions(statInfos.st_mode); - setUserName(); - setGroupName(); + updateUserName(); + updateGroupName(); #endif modificationTime = 0; diff --git a/src/sequenceParser/ItemStat.hpp b/src/sequenceParser/ItemStat.hpp index b5a8549..b64e856 100644 --- a/src/sequenceParser/ItemStat.hpp +++ b/src/sequenceParser/ItemStat.hpp @@ -24,8 +24,10 @@ class ItemStat void statLink( const boost::filesystem::path& path ); #ifdef __UNIX__ void setPermissions( const mode_t& protection ); - void setUserName(); - void setGroupName(); + /// @brief Update user name from filesystem + void updateUserName(); + /// @brief Update group name from filesystem + void updateGroupName(); #endif public: diff --git a/src/sequenceParser/detail/analyze.cpp b/src/sequenceParser/detail/analyze.cpp index 74e0aa3..d73b8fb 100644 --- a/src/sequenceParser/detail/analyze.cpp +++ b/src/sequenceParser/detail/analyze.cpp @@ -378,7 +378,7 @@ std::vector buildSequences( const boost::filesystem::path& directory, std::size_t decomposeFilename( const std::string& filename, FileStrings& stringParts, FileNumbers& numberParts, const EDetection& options ) { - static const std::size_t max = std::numeric_limits::digits10; + static const std::size_t max = std::numeric_limits