From b1926349465102eaa89e50959130e43d14f60321 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 22 Jul 2013 04:10:36 -0500 Subject: [PATCH] fixed issue 1599:Shell relative paths while webserver's are absolute in dal, thanks Alan --- VERSION | 2 +- gluon/dal.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index f29bb318..d919b3d3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.6.0-development+timestamp.2013.07.22.04.03.41 +Version 2.6.0-development+timestamp.2013.07.22.04.09.52 diff --git a/gluon/dal.py b/gluon/dal.py index b0e97d82..515ea300 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -567,6 +567,11 @@ class ConnectionPool(object): """ this actually does not make the folder. it has to be there """ self.folder = getattr(THREAD_LOCAL,'folder','') + if (os.path.isabs(self.folder) and + isinstance(self, UseDatabaseStoredFile) and + self.folder.startswith(os.getcwd())): + self.folder = os.path.relpath(self.folder, os.getcwd()) + # Creating the folder if it does not exist if False and self.folder and not exists(self.folder): os.mkdir(self.folder)