odoo/odoo — pull request #823 by sebalix (2014-06-28 14:50:27+00:00)
Title: [FIX] server: db service, fix the filestore copy when duplicating a database

When duplicating a database, an IOError is raised:

```python
Traceback (most recent call last):
File "/home/odoo/instances/odoo/openerp/http.py", line 92, in dispatch_rpc
result = dispatch(method, params)
File "/home/odoo/instances/odoo/openerp/service/db.py", line 75, in dispatch
return fn(*params)
File "/home/odoo/instances/odoo/openerp/service/db.py", line 133, in exp_duplicate_database
print 'TO_FS', to_fs
File "/usr/lib/python2.7/shutil.py", line 119, in copy
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 21] Is a directory: '/home/odoo/.local/share/OpenERP/filestore/odoo_test'
```
`shutil.copy` is not able to copy the whole filestore directory, `shutil.copytree` instead works fine.