removed folderIterator::d_name() because it duplicates file_name()

This commit is contained in:
csoler 2016-10-09 21:03:01 +02:00
parent 32816eda71
commit 957d48b5fc
5 changed files with 4 additions and 28 deletions

View File

@ -147,8 +147,7 @@ void RsPluginManager::loadPlugins(const std::vector<std::string>& plugin_directo
for(;dirIt.isValid();dirIt.next())
{
std::string fname;
dirIt.d_name(fname);
std::string fname = dirIt.file_name();
char lc = plugin_directories[i][plugin_directories[i].length()-1] ; // length cannot be 0 here.

View File

@ -536,8 +536,7 @@ bool RsAccountsDetail::getAvailableAccounts(std::map<RsPeerId, AccountDetails> &
for(;dirIt.isValid();dirIt.next())
{
/* check entry type */
std::string fname;
dirIt.d_name(fname);
std::string fname = dirIt.file_name();
std::string fullname = mBaseDirectory + "/" + fname;
#ifdef FIM_DEBUG
std::cerr << "calling stats on " << fullname <<std::endl;

View File

@ -63,7 +63,7 @@ void FolderIterator::next()
{
while(readdir())
{
d_name(mFileName);
mFileName = ent->d_name ;
if(mFileName == "." || mFileName == "..")
continue ;
@ -145,25 +145,6 @@ bool FolderIterator::readdir()
#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 ; }
const std::string& FolderIterator::file_fullpath() { return mFullPath ; }

View File

@ -39,8 +39,6 @@ public:
bool readdir();
void next();
#warning this one should go, as it reports the same information than file_name()
bool d_name(std::string& dest);
bool closedir();
const std::string& file_name() ;

View File

@ -293,8 +293,7 @@ int RsIntroServer::checkForNewCerts()
for(;dirIt.isValid();dirIt.next())
{
/* check entry type */
std::string fname;
dirIt.d_name(fname);
std::string fname = dirIt.file_name();
std::string fullname = mCertLoadPath + "/" + fname;
#ifdef RSIS_DEBUG
std::cerr << "calling stats on " << fullname <<std::endl;