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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user