[web] Do not try to rmtree symlinks in rmtreecontent()
There is a symlink in data directory (created by generate_static_dir() method)
and trying to rmtree() it will fail with an OSError. So we unlink() it
instead.
--- a/cubicweb/web/webctl.py Thu Apr 13 12:20:30 2017 +0200
+++ b/cubicweb/web/webctl.py Thu Apr 13 13:57:32 2017 +0200
@@ -44,7 +44,7 @@
itself)"""
for fname in os.listdir(dst):
fpath = osp.join(dst, fname)
- if osp.isfile(fpath):
+ if osp.isfile(fpath) or osp.islink(fpath):
os.unlink(fpath)
else:
rmtree(fpath)