1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-18 00:54:19 +00:00

DirectoryContentsList: Fix a bug in isStillLoading

This commit is contained in:
Tom Poole 2022-04-21 12:05:41 +01:00
parent eb80465aa9
commit 68ad0ef3d8
2 changed files with 3 additions and 3 deletions

View file

@ -103,7 +103,7 @@ void DirectoryContentsList::refresh()
if (root.isDirectory())
{
fileFindHandle = std::make_unique<RangedDirectoryIterator>(root, false, "*", fileTypeFlags);
fileFindHandle = std::make_unique<RangedDirectoryIterator> (root, false, "*", fileTypeFlags);
shouldStop = false;
isSearching = true;
thread.addTimeSliceClient (this);
@ -215,6 +215,7 @@ bool DirectoryContentsList::checkNextFile (bool& hasChanged)
}
fileFindHandle = nullptr;
isSearching = false;
if (! wasEmpty && files.isEmpty())
hasChanged = true;

View file

@ -201,8 +201,7 @@ private:
OwnedArray<FileInfo> files;
std::unique_ptr<RangedDirectoryIterator> fileFindHandle;
std::atomic<bool> shouldStop { true };
bool isSearching = false;
std::atomic<bool> shouldStop { true }, isSearching { false };
bool wasEmpty = true;