SHARE
TWEET

Untitled

a guest Mar 28th, 2012 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --- loggerhead/controllers/directory_ui.py.ori  2012-03-28 07:16:46.000000000 +0200
  2. +++ loggerhead/controllers/directory_ui.py      2012-03-28 08:52:40.000000000 +0200
  3. @@ -81,13 +81,21 @@
  4.                  except errors.NoSuchFile:
  5.                      continue
  6.                  b = None
  7. -            dirs.append(DirEntry(d, parity, b))
  8. -            parity = 1 - parity
  9. +            newentry = DirEntry(d, parity, b)
  10. +            pos = 0
  11. +            for entry in dirs:
  12. +                if newentry.last_change != None and entry.last_change != None and newentry.last_change > entry.last_change:
  13. +                    break
  14. +                pos += 1
  15. +            dirs.insert(pos, newentry)
  16.          # Create breadcrumb trail
  17.          directory_breadcrumbs = util.directory_breadcrumbs(
  18.                  self._name,
  19.                  False,
  20.                  'directory')
  21. +        for d in dirs:
  22. +            d.parity = parity
  23. +            parity = 1 - parity
  24.          return {
  25.              'dirs': dirs,
  26.              'name': self._name,
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top