mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
Prevent moving directories into themselves
This commit is contained in:
parent
86c62fda42
commit
dafbf32c4b
@ -674,6 +674,15 @@ class vfs
|
|||||||
|
|
||||||
umask (000);
|
umask (000);
|
||||||
|
|
||||||
|
/* We can't move directories into themselves */
|
||||||
|
if (($this->file_type ($f->fake_full_path, array (RELATIVE_NONE)) == "Directory") && ereg ("^$f->fake_full_path", $t->fake_full_path))
|
||||||
|
{
|
||||||
|
if (($t->fake_full_path == $f->fake_full_path) || substr ($t->fake_full_path, strlen ($f->fake_full_path), 1) == "/")
|
||||||
|
{
|
||||||
|
return False;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->file_exists ($f->fake_full_path, array (RELATIVE_NONE)))
|
if ($this->file_exists ($f->fake_full_path, array (RELATIVE_NONE)))
|
||||||
{
|
{
|
||||||
/* We get the listing now, because it will change after we update the database */
|
/* We get the listing now, because it will change after we update the database */
|
||||||
|
Loading…
Reference in New Issue
Block a user