From 580d5f00c9af65e2ff8cbe6e560270a9d6b7e97d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonel=20C=C3=A2mara?= Date: Mon, 19 Jan 2015 23:50:39 +0000 Subject: [PATCH] Make app_cleanup use recursive_unlink to clean the cache folder. This fixes a bug with the admin cleaning of an app seen here: https://groups.google.com/d/msg/web2py/YMpbAlMLln8/VFuY_xQ7WFYJ --- gluon/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gluon/admin.py b/gluon/admin.py index 527c9665..d6834e6c 100644 --- a/gluon/admin.py +++ b/gluon/admin.py @@ -121,7 +121,7 @@ def app_cleanup(app, request): if os.path.exists(path): for f in os.listdir(path): try: - if f[:1] != '.': os.unlink(os.path.join(path, f)) + if f[:1] != '.': recursive_unlink(os.path.join(path, f)) except IOError: r = False return r