Wed 14 Jan 2004 01:42:56 PM UTC, original submission:
(background: )Because I'm making some tests, I need sometimes to create collection (aka dir) in my repository, then go in them with phpgw, and delete them. But for deleting, this is not possible to do this in phpgw filemanager (because it's a group directory). So I need to delete it in using a webdav client (cadaver). All is nice, but if you try to remake the directory mkdir will failed because file_exists() checks related to the current directory (due to mkdir not using a relative directive in his path when asking if the file exists.). and if you where not in the good directory (ie '/'), and that you call mkdir with RELATIVE_NONE, the file_exists will failed.
in class.vfs_dav.inc.php
So I think that the correction could be something like add a relative to the file_exists() call near line2096 (in the if statement) which could be the same as the one used to create the directory.
hehe, after reading the class.vfs_sql.inc.php I see that this is what it is done. (sorry I think in the same time that making this bug report).
So to be short, please sync bugs between vfs_sql and vfs_dav, because they have a lot's of code in common :).
I will try to make some patch about this if I get the time.
regards,
Caeies.
PS: the vfs_sql use this :
if (!$this->file_exists (array(
'string' => $p->fake_full_path,
'relatives' => array ($p->mask)
))
)
and so, the webdav should be turn from :
if (!$this->file_exists (array(
'string' => $p->fake_full_path.'/'
))
)
too :
if ($this->file_exists (array(
'string' => $p->fake_full_path,
'relatives' => array ($p->mask)
))
)
(please not the correction of the previous bug by removing the "!" see bugs #7228)
|