From cc3da8a50e69adfdcf5b861b6e46e27ca66514cd Mon Sep 17 00:00:00 2001 From: mdipierro Date: Tue, 27 Aug 2013 06:30:58 -0500 Subject: [PATCH] fixed get_app problem on windows --- VERSION | 2 +- applications/admin/controllers/default.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index c1ee9c65..fe6677da 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.6.0-development+timestamp.2013.08.26.16.56.15 +Version 2.6.0-development+timestamp.2013.08.27.06.30.01 diff --git a/applications/admin/controllers/default.py b/applications/admin/controllers/default.py index 5ed0c2ad..360ce7bd 100644 --- a/applications/admin/controllers/default.py +++ b/applications/admin/controllers/default.py @@ -85,13 +85,11 @@ def safe_write(a, value, b='w'): 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 + if (app and os.path.exists(apath(name, r=request)) and (not MULTI_USER_MODE or is_manager() or db(db.app.name == app)(db.app.owner == auth.user.id).count())): return app - session.flash = T('App does not exist or your are not authorized') + session.flash = T('App does not exist or you are not authorized') redirect(URL('site'))