fix directory rewind on unix

master
Daniel Kolesa 2015-09-08 01:17:28 +01:00
parent 9648d5e011
commit d1912c4237
1 changed files with 4 additions and 1 deletions

View File

@ -277,7 +277,10 @@ struct DirectoryStream {
bool rewind() {
if (!p_d) return false;
rewinddir(p_d);
p_de = nullptr;
if (!pop_front() || !skip_dots()) {
close();
return false;
}
return true;
}