mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-29 17:28:41 -04:00
fixed problems with negative time shifts in DirDetails causing multiple GUI bugs in File Lists and Search
This commit is contained in:
parent
d433713bd0
commit
8c8cc88503
9 changed files with 56 additions and 40 deletions
|
@ -206,8 +206,6 @@ bool DirectoryStorage::extractData(const EntryIndex& indx,DirDetails& d)
|
|||
RS_STACK_MUTEX(mDirStorageMtx) ;
|
||||
|
||||
d.children.clear() ;
|
||||
time_t now = time(NULL) ;
|
||||
|
||||
uint32_t type = mFileHierarchy->getType(indx) ;
|
||||
|
||||
d.ref = (void*)(intptr_t)indx ;
|
||||
|
@ -241,8 +239,8 @@ bool DirectoryStorage::extractData(const EntryIndex& indx,DirDetails& d)
|
|||
d.type = DIR_TYPE_DIR;
|
||||
d.hash.clear() ;
|
||||
d.count = dir_entry->subdirs.size() + dir_entry->subfiles.size();
|
||||
d.min_age = now - dir_entry->dir_most_recent_time ;
|
||||
d.age = now - dir_entry->dir_modtime ;
|
||||
d.max_mtime = dir_entry->dir_most_recent_time ;
|
||||
d.mtime = dir_entry->dir_modtime ;
|
||||
d.name = dir_entry->dir_name;
|
||||
d.path = RsDirUtil::makePath(dir_entry->dir_parent_path, dir_entry->dir_name) ;
|
||||
d.parent = (void*)(intptr_t)dir_entry->parent_index ;
|
||||
|
@ -259,10 +257,10 @@ bool DirectoryStorage::extractData(const EntryIndex& indx,DirDetails& d)
|
|||
|
||||
d.type = DIR_TYPE_FILE;
|
||||
d.count = file_entry->file_size;
|
||||
d.min_age = now - file_entry->file_modtime ;
|
||||
d.max_mtime = file_entry->file_modtime ;
|
||||
d.name = file_entry->file_name;
|
||||
d.hash = file_entry->file_hash;
|
||||
d.age = now - file_entry->file_modtime;
|
||||
d.mtime = file_entry->file_modtime;
|
||||
d.parent = (void*)(intptr_t)file_entry->parent_index ;
|
||||
|
||||
const InternalFileHierarchyStorage::DirEntry *parent_dir_entry = mFileHierarchy->getDirEntry(file_entry->parent_index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue