mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-20 23:10:39 -04:00
added param to folderIterator to skip/follow symbolic links
This commit is contained in:
parent
608d0d0a65
commit
6272856b5e
7 changed files with 27 additions and 7 deletions
|
@ -438,7 +438,7 @@ bool RsDirUtil::checkCreateDirectory(const std::string& dir)
|
|||
|
||||
bool RsDirUtil::cleanupDirectory(const std::string& cleandir, const std::set<std::string> &keepFiles)
|
||||
{
|
||||
for(librs::util::FolderIterator it(cleandir);it.isValid();it.next())
|
||||
for(librs::util::FolderIterator it(cleandir,false);it.isValid();it.next())
|
||||
if(it.file_type() == librs::util::FolderIterator::TYPE_FILE && (keepFiles.end() == std::find(keepFiles.begin(), keepFiles.end(), it.file_name())))
|
||||
remove( (cleandir + "/" + it.file_name()).c_str() ) ;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue