mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-28 00:45:34 -04:00
Solve non compatible 32/64bit file handle API
This commit is contained in:
parent
2a369cb785
commit
7d388c3090
5 changed files with 39 additions and 48 deletions
|
@ -345,12 +345,12 @@ std::error_condition ftServer::requestFiles(
|
|||
// Track how many time a directory have been explored
|
||||
std::vector<uint32_t> dirsSeenCnt(dirsCount, 0);
|
||||
// <directory handle, parent path>
|
||||
using StackEntry = std::tuple<std::uintptr_t, std::string>;
|
||||
using StackEntry = std::tuple<uint64_t, std::string>;
|
||||
std::deque<StackEntry> dStack = { std::make_tuple(0, basePath) };
|
||||
|
||||
const auto exploreDir = [&](const StackEntry& se)-> std::error_condition
|
||||
{
|
||||
std::uintptr_t dirHandle; std::string parentPath;
|
||||
uint64_t dirHandle; std::string parentPath;
|
||||
std::tie(dirHandle, parentPath) = se;
|
||||
|
||||
const auto& dirData = collection.mDirs[dirHandle];
|
||||
|
@ -843,7 +843,7 @@ bool ftServer::findChildPointer(void *ref, int row, void *& result, FileSearchFl
|
|||
}
|
||||
|
||||
bool ftServer::requestDirDetails(
|
||||
DirDetails &details, std::uintptr_t handle, FileSearchFlags flags )
|
||||
DirDetails &details, uint64_t handle, FileSearchFlags flags )
|
||||
{ return RequestDirDetails(reinterpret_cast<void*>(handle), details, flags); }
|
||||
|
||||
int ftServer::RequestDirDetails(void *ref, DirDetails &details, FileSearchFlags flags)
|
||||
|
@ -2249,7 +2249,7 @@ std::error_condition ftServer::dirDetailsToLink(
|
|||
}
|
||||
|
||||
std::error_condition ftServer::exportCollectionLink(
|
||||
std::string& link, std::uintptr_t handle, bool fragSneak,
|
||||
std::string& link, uint64_t handle, bool fragSneak,
|
||||
const std::string& baseUrl )
|
||||
{
|
||||
DirDetails tDirDet;
|
||||
|
|
|
@ -225,7 +225,7 @@ public:
|
|||
|
||||
/// @see RsFiles
|
||||
std::error_condition exportCollectionLink(
|
||||
std::string& link, std::uintptr_t handle, bool fragSneak = false,
|
||||
std::string& link, uint64_t handle, bool fragSneak = false,
|
||||
const std::string& baseUrl = RsFiles::DEFAULT_FILES_BASE_URL
|
||||
) override;
|
||||
|
||||
|
@ -279,7 +279,7 @@ public:
|
|||
|
||||
/// @see RsFiles::RequestDirDetails
|
||||
virtual bool requestDirDetails(
|
||||
DirDetails &details, std::uintptr_t handle = 0,
|
||||
DirDetails &details, uint64_t handle = 0,
|
||||
FileSearchFlags flags = RS_FILE_HINTS_LOCAL );
|
||||
|
||||
virtual bool findChildPointer(void *ref, int row, void *& result, FileSearchFlags flags) ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue