projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
45b7a3a
)
Document ftp: better handling of wrong paths.
author
P. Christeas
<p_christ@hol.gr>
Tue, 6 Jul 2010 06:01:55 +0000
(09:01 +0300)
committer
P. Christeas
<p_christ@hol.gr>
Tue, 6 Jul 2010 06:01:55 +0000
(09:01 +0300)
bzr revid: p_christ@hol.gr-
20100706060155
-nyljhua59ahax7sx
addons/document_ftp/ftpserver/abstracted_fs.py
patch
|
blob
|
history
diff --git
a/addons/document_ftp/ftpserver/abstracted_fs.py
b/addons/document_ftp/ftpserver/abstracted_fs.py
index
ae6ca93
..
b5465c9
100644
(file)
--- a/
addons/document_ftp/ftpserver/abstracted_fs.py
+++ b/
addons/document_ftp/ftpserver/abstracted_fs.py
@@
-300,9
+300,11
@@
class abstracted_fs(object):
if os.path.isabs(path):
# we have to start from root, again
p_parts = p_parts[1:]
+ if not p_parts:
+ raise IOError(errno.EPERM, 'Cannot perform operation at root dir')
dbname = p_parts[0]
if dbname not in self.db_list():
- return None
+ return IOError(errno.ENOENT,'Invalid database path')
try:
db = pooler.get_db(dbname)
except Exception: