diff options
| author | Tannin <devnull@localhost> | 2013-10-20 16:51:40 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2013-10-20 16:51:40 +0200 |
| commit | bc7c42dbe8dd85a77a2eb8c1d094c77aa5cb7b1f (patch) | |
| tree | 63ed11fb562f87cbe815fb78978c6c801a1119e0 /src/shared/directoryentry.cpp | |
| parent | 9a03783f491505940a20d006055a5427bf364807 (diff) | |
- directories in data-view are now sorted
- questionbox with selection memory is now exposed to plugins
- the choice to run fnis from the checker can now be memorized
Diffstat (limited to 'src/shared/directoryentry.cpp')
| -rw-r--r-- | src/shared/directoryentry.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/shared/directoryentry.cpp b/src/shared/directoryentry.cpp index b3a12498..dde8a69e 100644 --- a/src/shared/directoryentry.cpp +++ b/src/shared/directoryentry.cpp @@ -492,6 +492,12 @@ static bool SupportOptimizedFind() }
+static bool DirCompareByName(const DirectoryEntry *lhs, const DirectoryEntry *rhs)
+{
+ return wcsicmp(lhs->getName().c_str(), rhs->getName().c_str()) < 0;
+}
+
+
void DirectoryEntry::addFiles(FilesOrigin &origin, wchar_t *buffer, int bufferOffset)
{
WIN32_FIND_DATAW findData;
@@ -523,6 +529,7 @@ void DirectoryEntry::addFiles(FilesOrigin &origin, wchar_t *buffer, int bufferOf result = ::FindNextFileW(searchHandle, &findData);
}
}
+ std::sort(m_SubDirectories.begin(), m_SubDirectories.end(), &DirCompareByName);
::FindClose(searchHandle);
}
|
