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
This commit is contained in:
Leonel Câmara
2015-01-19 23:50:39 +00:00
parent 5bc5d0496e
commit 580d5f00c9
+1 -1
View File
@@ -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