Bug 616256 - Don't stat files on directory enumeration on windows r=bsmedberg+dougt a=2.0
authorTaras Glek <tglek@mozilla.com>
Tue, 07 Dec 2010 11:47:24 -0800
changeset 58787 eb947172ce38cbd4124db49727bf5fcad6b1125e
parent 58786 d87be167b4108f574fc918728abf50a3a9c72243
child 58788 de295f93a28a111f65a0f238641438ee1e3a7977
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg, 2.0
bugs616256
milestone2.0b8pre
Bug 616256 - Don't stat files on directory enumeration on windows r=bsmedberg+dougt a=2.0
xpcom/io/nsLocalFileWin.cpp
--- a/xpcom/io/nsLocalFileWin.cpp
+++ b/xpcom/io/nsLocalFileWin.cpp
@@ -677,24 +677,16 @@ class nsDirEnumerator : public nsISimple
                 rv = mParent->Clone(getter_AddRefs(file));
                 if (NS_FAILED(rv))
                     return rv;
 
                 rv = file->Append(name);
                 if (NS_FAILED(rv))
                     return rv;
 
-                // make sure the thing exists.  If it does, try the next one.
-                PRBool exists;
-                rv = file->Exists(&exists);
-                if (NS_FAILED(rv) || !exists)
-                {
-                    return HasMoreElements(result);
-                }
-
                 mNext = do_QueryInterface(file);
             }
             *result = mNext != nsnull;
             if (!*result) 
                 Close();
             return NS_OK;
         }