mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-22 15:51:29 -04:00
Removed unnecessary loops for debug output in CacheStrapper::loadList without debug enabled.
Changed parameter of RsDirUtil::cleanupDirectory from "std::list<std::string> keepFiles" to "const std::list<std::string> &keepFiles". git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3925 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
5bc8e68059
commit
ab42691a31
3 changed files with 11 additions and 10 deletions
|
@ -534,7 +534,7 @@ bool RsDirUtil::checkCreateDirectory(const std::string& dir)
|
|||
//#include <fcntl.h>
|
||||
//#include <unistd.h>
|
||||
|
||||
bool RsDirUtil::cleanupDirectory(const std::string& cleandir, std::list<std::string> keepFiles)
|
||||
bool RsDirUtil::cleanupDirectory(const std::string& cleandir, const std::list<std::string> &keepFiles)
|
||||
{
|
||||
|
||||
/* check for the dir existance */
|
||||
|
@ -552,7 +552,7 @@ bool RsDirUtil::cleanupDirectory(const std::string& cleandir, std::list<std::st
|
|||
while(NULL != (dent = readdir(dir)))
|
||||
{
|
||||
/* check entry type */
|
||||
std::string fname = dent -> d_name;
|
||||
const std::string &fname = dent -> d_name;
|
||||
std::string fullname = cleandir + "/" + fname;
|
||||
|
||||
if (-1 != stat(fullname.c_str(), &buf))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue