1
0

Merge pull request #3625 from Seadragon91/patch-1

Removed unnecessary check for lower and upper folder
This commit is contained in:
Lukas Pioch 2017-03-16 19:33:48 +01:00 committed by GitHub
commit e70b399435
2 changed files with 1 additions and 7 deletions

View File

@ -68,7 +68,7 @@ void cPluginManager::RefreshPluginList(void)
AStringVector Folders;
for (auto & item: Contents)
{
if ((item == ".") || (item == "..") || (!cFile::IsFolder(PluginsPath + item)))
if (!cFile::IsFolder(PluginsPath + item))
{
// We only want folders, and don't want "." or ".."
continue;

View File

@ -336,12 +336,6 @@ bool cFile::DeleteFolderContents(const AString & a_FolderName)
auto Contents = cFile::GetFolderContents(a_FolderName);
for (const auto & item: Contents)
{
// Skip "." and ".." altogether:
if ((item == ".") || (item == ".."))
{
continue;
}
// Remove the item:
auto WholePath = a_FolderName + GetPathSeparator() + item;
if (IsFolder(WholePath))