DirectoryReader.readDirectory should not call EntriesCallback twice if there're no entries. Currently it wrongly calls the callback twice (one to return entries that is empty and the other one to indicate there's no more entries.) http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-directoryreader-interface
Created attachment 67103 [details] Patch
Comment on attachment 67103 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=67103&action=prettypatch r=me, but please address the comments before submitting. > WebCore/fileapi/FileSystemCallbacks.cpp:150 > + if (!hasMore && hadEntries) { i don't think you need the hadEntries variable. can you just use: if (!hasMore && !m_entries->isEmpty()) and clear m_entries after the if-block? > WebCore/fileapi/FileSystemCallbacks.cpp:151 > // If there're no more entries, call back once more with an empty array. update the comment please.
Committed r67220: <http://trac.webkit.org/changeset/67220>