mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 08:59:37 -05:00
Merge pull request #547 from hunbernd/fix/upload
Fix: unable to upload files on Windows
This commit is contained in:
commit
5ccdc28cb1
@ -189,7 +189,7 @@ bool InternalFileHierarchyStorage::updateSubDirectoryList(const DirectoryStorage
|
||||
de->row = mNodes.size();
|
||||
de->parent_index = indx;
|
||||
de->dir_modtime = 0;// forces parsing.it->second;
|
||||
de->dir_parent_path = d.dir_parent_path + "/" + d.dir_name ;
|
||||
de->dir_parent_path = RsDirUtil::makePath(d.dir_parent_path, d.dir_name) ;
|
||||
de->dir_hash = createDirHash(de->dir_name,d.dir_hash,random_hash_seed) ;
|
||||
|
||||
mDirHashes[de->dir_hash] = mNodes.size() ;
|
||||
@ -446,7 +446,7 @@ bool InternalFileHierarchyStorage::updateDirEntry(const DirectoryStorage::EntryI
|
||||
|
||||
mNodes[dir_index] = de ;
|
||||
|
||||
de->dir_parent_path = d.dir_parent_path + "/" + dir_name ;
|
||||
de->dir_parent_path = RsDirUtil::makePath(d.dir_parent_path, dir_name) ;
|
||||
de->dir_hash = subdirs_hash[i];
|
||||
|
||||
mDirHashes[subdirs_hash[i]] = dir_index ;
|
||||
@ -696,7 +696,7 @@ public:
|
||||
inline virtual uint64_t file_size() const { return mFe.file_size ; }
|
||||
inline virtual const RsFileHash& file_hash() const { return mFe.file_hash ; }
|
||||
inline virtual time_t file_modtime() const { return mFe.file_modtime ; }
|
||||
inline virtual std::string file_parent_path()const { return mDe.dir_parent_path + "/" + mDe.dir_name ; }
|
||||
inline virtual std::string file_parent_path()const { return RsDirUtil::makePath(mDe.dir_parent_path, mDe.dir_name) ; }
|
||||
inline virtual uint32_t file_popularity() const { NOT_IMPLEMENTED() ; return 0; }
|
||||
|
||||
private:
|
||||
|
@ -244,7 +244,7 @@ bool DirectoryStorage::extractData(const EntryIndex& indx,DirDetails& d)
|
||||
d.min_age = now - dir_entry->dir_most_recent_time ;
|
||||
d.age = now - dir_entry->dir_modtime ;
|
||||
d.name = dir_entry->dir_name;
|
||||
d.path = dir_entry->dir_parent_path + "/" + 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 ;
|
||||
|
||||
if(indx == 0)
|
||||
@ -268,7 +268,7 @@ bool DirectoryStorage::extractData(const EntryIndex& indx,DirDetails& d)
|
||||
const InternalFileHierarchyStorage::DirEntry *parent_dir_entry = mFileHierarchy->getDirEntry(file_entry->parent_index);
|
||||
|
||||
if(parent_dir_entry != NULL)
|
||||
d.path = parent_dir_entry->dir_parent_path + "/" + parent_dir_entry->dir_name + "/" ;
|
||||
d.path = RsDirUtil::makePath(parent_dir_entry->dir_parent_path, parent_dir_entry->dir_name) ;
|
||||
else
|
||||
d.path = "" ;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user