changeset 2010:d234621dbf2f

don't store trail for first request avoids storing sessions to disk for requests from users that won't send back the session cookie anyway
author Johannes Berg <johannes AT sipsolutions DOT net>
date Fri, 20 Apr 2007 15:35:31 +0200
parents 1b14cc05a54a
children 6cd0e4cc8e18
files MoinMoin/user.py
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/user.py	Fri Apr 20 15:35:14 2007 +0200
+++ b/MoinMoin/user.py	Fri Apr 20 15:35:31 2007 +0200
@@ -889,12 +889,9 @@
             self.saveTrail()
 
     def saveTrail(self):
-        """ Save trail file
-
-        Save using one write call, which should be fine in most cases,
-        but will fail in rare cases without real file locking.
-        """
-        self._request.session['trail'] = self._trail
+        """ Save trail into session """
+        if not self._request.session.is_new:
+            self._request.session['trail'] = self._trail
 
     def getTrail(self):
         """ Return list of recently visited pages.