Fixed #1146 - removing directories didn't work (listFiles() returns absolute

paths (now??)).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14988 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk
2014-01-09 23:07:01 +00:00
parent 0566d785b1
commit ba1e6465ef

View File

@@ -1066,8 +1066,7 @@ bool FileManager::removeDirectory(const std::string &name) const
if(UserConfigParams::logMisc())
Log::verbose("FileManager", "Deleting directory '%s'.",
(*i).c_str());
std::string full_path=name+"/"+*i;
if(isDirectory(full_path))
if(isDirectory(*i))
{
// This should not be necessary (since this function is only
// used to remove addons), and it limits the damage in case
@@ -1076,7 +1075,7 @@ bool FileManager::removeDirectory(const std::string &name) const
}
else
{
removeFile(full_path);
removeFile(*i);
}
}
#if defined(WIN32)