mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-24 22:30:42 -04:00
removed folderIterator::d_name() because it duplicates file_name()
This commit is contained in:
parent
32816eda71
commit
957d48b5fc
5 changed files with 4 additions and 28 deletions
|
@ -147,8 +147,7 @@ void RsPluginManager::loadPlugins(const std::vector<std::string>& plugin_directo
|
||||||
|
|
||||||
for(;dirIt.isValid();dirIt.next())
|
for(;dirIt.isValid();dirIt.next())
|
||||||
{
|
{
|
||||||
std::string fname;
|
std::string fname = dirIt.file_name();
|
||||||
dirIt.d_name(fname);
|
|
||||||
|
|
||||||
char lc = plugin_directories[i][plugin_directories[i].length()-1] ; // length cannot be 0 here.
|
char lc = plugin_directories[i][plugin_directories[i].length()-1] ; // length cannot be 0 here.
|
||||||
|
|
||||||
|
|
|
@ -536,8 +536,7 @@ bool RsAccountsDetail::getAvailableAccounts(std::map<RsPeerId, AccountDetails> &
|
||||||
for(;dirIt.isValid();dirIt.next())
|
for(;dirIt.isValid();dirIt.next())
|
||||||
{
|
{
|
||||||
/* check entry type */
|
/* check entry type */
|
||||||
std::string fname;
|
std::string fname = dirIt.file_name();
|
||||||
dirIt.d_name(fname);
|
|
||||||
std::string fullname = mBaseDirectory + "/" + fname;
|
std::string fullname = mBaseDirectory + "/" + fname;
|
||||||
#ifdef FIM_DEBUG
|
#ifdef FIM_DEBUG
|
||||||
std::cerr << "calling stats on " << fullname <<std::endl;
|
std::cerr << "calling stats on " << fullname <<std::endl;
|
||||||
|
|
|
@ -63,7 +63,7 @@ void FolderIterator::next()
|
||||||
{
|
{
|
||||||
while(readdir())
|
while(readdir())
|
||||||
{
|
{
|
||||||
d_name(mFileName);
|
mFileName = ent->d_name ;
|
||||||
|
|
||||||
if(mFileName == "." || mFileName == "..")
|
if(mFileName == "." || mFileName == "..")
|
||||||
continue ;
|
continue ;
|
||||||
|
@ -145,25 +145,6 @@ bool FolderIterator::readdir()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FolderIterator::d_name(std::string& dest)
|
|
||||||
{
|
|
||||||
if(!validity)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
#ifdef WINDOWS_SYS
|
|
||||||
if(! ConvertUtf16ToUtf8(fileInfo.cFileName, dest)) {
|
|
||||||
validity = false;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if(ent == 0)
|
|
||||||
return false;
|
|
||||||
dest = ent->d_name;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
time_t FolderIterator::dir_modtime() const { return mFolderModTime ; }
|
time_t FolderIterator::dir_modtime() const { return mFolderModTime ; }
|
||||||
|
|
||||||
const std::string& FolderIterator::file_fullpath() { return mFullPath ; }
|
const std::string& FolderIterator::file_fullpath() { return mFullPath ; }
|
||||||
|
|
|
@ -39,8 +39,6 @@ public:
|
||||||
bool readdir();
|
bool readdir();
|
||||||
void next();
|
void next();
|
||||||
|
|
||||||
#warning this one should go, as it reports the same information than file_name()
|
|
||||||
bool d_name(std::string& dest);
|
|
||||||
bool closedir();
|
bool closedir();
|
||||||
|
|
||||||
const std::string& file_name() ;
|
const std::string& file_name() ;
|
||||||
|
|
|
@ -293,8 +293,7 @@ int RsIntroServer::checkForNewCerts()
|
||||||
for(;dirIt.isValid();dirIt.next())
|
for(;dirIt.isValid();dirIt.next())
|
||||||
{
|
{
|
||||||
/* check entry type */
|
/* check entry type */
|
||||||
std::string fname;
|
std::string fname = dirIt.file_name();
|
||||||
dirIt.d_name(fname);
|
|
||||||
std::string fullname = mCertLoadPath + "/" + fname;
|
std::string fullname = mCertLoadPath + "/" + fname;
|
||||||
#ifdef RSIS_DEBUG
|
#ifdef RSIS_DEBUG
|
||||||
std::cerr << "calling stats on " << fullname <<std::endl;
|
std::cerr << "calling stats on " << fullname <<std::endl;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue