def get_app(name=None):
app = name or request.args(0)
folder = request.folder if not request.folder.endswith('/') else request.folder[:-1]
if (app and os.path.exists(os.path.join(os.path.dirname(folder),app)) and
(not MULTI_USER_MODE or is_manager() or
return app
session.flash = T('App does not exist or your are not authorized')
redirect(URL('site'))
replace
session.flash = T('App does not exist or your are not authorized')
with
session.flash = os.path.join(os.path.dirname(folder),app)
What is the flash message? Does that folder exist?