Mercurial > libervia-web
comparison src/server/server.py @ 1066:d1324e43d448
server: fixed profile cache path (the path has changed and "profiles" is now needed)
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 14 Mar 2018 09:20:38 +0100 |
parents | 4b69f69c6ffd |
children | 9c41b7e91172 |
comparison
equal
deleted
inserted
replaced
1065:5f97118dc82a | 1066:d1324e43d448 |
---|---|
1587 log.error(_(u'/!\\ Session has already a profile, this should NEVER happen!')) | 1587 log.error(_(u'/!\\ Session has already a profile, this should NEVER happen!')) |
1588 raise failure.Failure(exceptions.ConflictError("Already active")) | 1588 raise failure.Failure(exceptions.ConflictError("Already active")) |
1589 | 1589 |
1590 sat_session.profile = profile | 1590 sat_session.profile = profile |
1591 self.prof_connected.add(profile) | 1591 self.prof_connected.add(profile) |
1592 cache_dir = os.path.join(self.cache_root_dir, regex.pathEscape(profile)) | 1592 cache_dir = os.path.join(self.cache_root_dir, u'profiles', regex.pathEscape(profile)) |
1593 # FIXME: would be better to have a global /cache URL which redirect to profile's cache directory, without uuid | 1593 # FIXME: would be better to have a global /cache URL which redirect to profile's cache directory, without uuid |
1594 self.cache_resource.putChild(sat_session.uuid, ProtectedFile(cache_dir)) | 1594 self.cache_resource.putChild(sat_session.uuid, ProtectedFile(cache_dir)) |
1595 log.debug(_(u"profile cache resource added from {uuid} to {path}").format(uuid=sat_session.uuid, path=cache_dir)) | 1595 log.debug(_(u"profile cache resource added from {uuid} to {path}").format(uuid=sat_session.uuid, path=cache_dir)) |
1596 | 1596 |
1597 def onExpire(): | 1597 def onExpire(): |