summaryrefslogtreecommitdiff
path: root/src/shared/directoryentry.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2013-09-28 21:13:57 +0200
committerTannin <devnull@localhost>2013-09-28 21:13:57 +0200
commit47293827bbd92ce227e5188c10b66deb9f85d5bf (patch)
treec8e9f34dc3105a3e73b41f8b2fb58d58439b06e0 /src/shared/directoryentry.cpp
parent0a3169b808cf2b84ae7c77fd6cb0a7b0aa9a8df3 (diff)
- download progress is now visible in task bar
- esp-tooltip now lists all masters, highlighting the missing ones - python plugin will now report a problem if the path contains a semicolon - leak detection now (somewaht) works around the fact that we don't always get a stack trace - bugfix: mod meta-file is now reliably created if it was missing - bugfix: parser for nxm-links didn't handle numbers in the mod name - bugfix: small memory leak
Diffstat (limited to 'src/shared/directoryentry.cpp')
-rw-r--r--src/shared/directoryentry.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/shared/directoryentry.cpp b/src/shared/directoryentry.cpp
index bd33fef6..8380181f 100644
--- a/src/shared/directoryentry.cpp
+++ b/src/shared/directoryentry.cpp
@@ -568,8 +568,9 @@ void DirectoryEntry::removeDirRecursive()
for (auto iter = m_SubDirectories.begin(); iter != m_SubDirectories.end(); ++iter) {
(*iter)->removeDirRecursive();
+ delete *iter;
}
- m_SubDirectories.clear();
+ m_SubDirectories.clear();
}
void DirectoryEntry::removeDir(const std::wstring &path)
@@ -578,8 +579,10 @@ void DirectoryEntry::removeDir(const std::wstring &path)
if (pos == std::string::npos) {
for (auto iter = m_SubDirectories.begin(); iter != m_SubDirectories.end(); ++iter) {
if (_wcsicmp((*iter)->getName().c_str(), path.c_str()) == 0) {
- (*iter)->removeDirRecursive();
+ DirectoryEntry *entry = *iter;
+ entry->removeDirRecursive();
m_SubDirectories.erase(iter);
+ delete entry;
break;
}
}