Fix: webdav: don't crash if an attachement is put at a wrong place.

This commit is contained in:
Bertrand Chenal committed 2008-05-28 18:22:18 +02:00
1 parent 0493ed106a
commit 02836f1684
1 file changed
+4 -1
+4 -1
View File
@@ -85,7 +85,10 @@ class Directory(OSV):
object_name = None
object_id = False
else:
object_id = int(name.rsplit('-', 1)[1].strip())
splitted_name = name.rsplit('-', 1)
if len(splitted_name) != 2:
return object_name, 0
object_id = int(splitted_name[1].strip())
if uri:
if '/' in uri:
return None, 0