mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-01 09:36:46 -04:00
fixed more tests. Added checking for initialized partials and download directories in RsDiscSpace
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6043 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8720ab968e
commit
3b678beca9
7 changed files with 50 additions and 38 deletions
|
@ -24,6 +24,7 @@
|
|||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
#include "retroshare/rsfiles.h"
|
||||
#include "retroshare/rsiface.h"
|
||||
#include "retroshare/rsinit.h"
|
||||
|
@ -129,6 +130,9 @@ bool RsDiscSpace::checkForDiscSpace(RsDiscSpace::DiscLocation loc)
|
|||
{
|
||||
RsStackMutex m(_mtx) ; // Locked
|
||||
|
||||
if(_partials_path == "" || _download_path == "")
|
||||
throw std::runtime_error("Download path and partial path not properly set in RsDiscSpace. Please call RsDiscSpace::setPartialsPath() and RsDiscSpace::setDownloadPath()") ;
|
||||
|
||||
time_t now = time(NULL) ;
|
||||
|
||||
if(_last_check[loc]+DELAY_BETWEEN_CHECKS < now)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue