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:
+1
-1
@@ -121,7 +121,7 @@ def app_cleanup(app, request):
|
|||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
for f in os.listdir(path):
|
for f in os.listdir(path):
|
||||||
try:
|
try:
|
||||||
if f[:1] != '.': os.unlink(os.path.join(path, f))
|
if f[:1] != '.': recursive_unlink(os.path.join(path, f))
|
||||||
except IOError:
|
except IOError:
|
||||||
r = False
|
r = False
|
||||||
return r
|
return r
|
||||||
|
|||||||
Reference in New Issue
Block a user