SVN: r21073 - trunk/quixote

Andrew Kuchling <akuchlin-fVcApmY9cLvQ3/1i3zOLAti2O/[email protected]> Wed, 12 Mar 2003 09:39:32 -0500
Newsgroups gmane.comp.web.quixote.cvs
Message-ID <[email protected]>
Author: akuchlin
Date: 2003-03-12 09:39:31 -0500 (Wed, 12 Mar 2003)
New Revision: 21073

Modified:
   trunk/quixote/util.py
Log:
Sort files in a directory

Modified: trunk/quixote/util.py
==============================================================================
--- trunk/quixote/util.py	(original)
+++ trunk/quixote/util.py	2003-03-12 09:39:32.000000000 -0500
@@ -139,7 +139,9 @@
                           % request.environ['REQUEST_URI'])
             print >>out, "<pre>"
             print >>out, template % ('..', '..', '')
-            for filename in os.listdir(self.path):
+            files = os.listdir(self.path)
+            files.sort()
+            for filename in files:
                 filepath = os.path.join(self.path, filename)
                 marker = os.path.isdir(filepath) and "/" or ""
                 print >>out, \