mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
ported commit 7487 from branch 0.5.5. Seems to fix loss of config files on windows.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7548 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
2350837bc6
commit
e18c934e21
@ -69,7 +69,7 @@
|
||||
* #define DEBUG_DWLQUEUE 1
|
||||
*****/
|
||||
|
||||
static const int32_t SAVE_TRANSFERS_DELAY = 61 ; // save transfer progress every 61 seconds.
|
||||
static const int32_t SAVE_TRANSFERS_DELAY = 301 ; // save transfer progress every 301 seconds.
|
||||
static const int32_t INACTIVE_CHUNKS_CHECK_DELAY = 240 ; // time after which an inactive chunk is released
|
||||
static const int32_t MAX_TIME_INACTIVE_REQUEUED = 120 ; // time after which an inactive ftFileControl is bt-queued
|
||||
static const int32_t TIMOUT_CACHE_FILE_TRANSFER = 800 ; // time after which cache transfer gets cancelled if inactive.
|
||||
@ -1211,8 +1211,6 @@ bool ftController::FileRequest(const std::string& fname, const RsFileHash& hash
|
||||
#endif
|
||||
(dit->second)->mTransfer->addFileSource(*it);
|
||||
setPeerState(dit->second->mTransfer, *it, rate, mServiceCtrl->isPeerConnected(mFtServiceId, *it));
|
||||
|
||||
IndicateConfigChanged(); /* new peer for transfer -> save */
|
||||
}
|
||||
|
||||
if (srcIds.size() == 0)
|
||||
|
@ -732,7 +732,7 @@ bool RsDirUtil::renameFile(const std::string& from, const std::string& to)
|
||||
std::wstring t;
|
||||
librs::util::ConvertUtf8ToUtf16(to, t);
|
||||
|
||||
while (!MoveFileEx(f.c_str(), t.c_str(), MOVEFILE_REPLACE_EXISTING))
|
||||
while (!MoveFileEx(f.c_str(), t.c_str(), MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH))
|
||||
#else
|
||||
std::string f(from),t(to) ;
|
||||
|
||||
@ -1348,7 +1348,7 @@ bool RsDirUtil::renameWideFile(const std::wstring& from, const std::wstring& to)
|
||||
#else
|
||||
std::wstring f(from),t(to) ;
|
||||
#endif
|
||||
while (!MoveFileEx(f.c_str(), t.c_str(), MOVEFILE_REPLACE_EXISTING))
|
||||
while (!MoveFileEx(f.c_str(), t.c_str(), MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH))
|
||||
#else
|
||||
/***** XXX TO MAKE WIDE SYSTEM CALL ******************************************************/
|
||||
std::string f(from.begin(), from.end());
|
||||
|
Loading…
Reference in New Issue
Block a user