* All apps: fix linking of filemanager files to entries, if there is no file yet

This commit is contained in:
Ralf Becker 2019-01-16 18:39:09 +01:00
parent a9dc895ca6
commit 4b73aee7c8

View File

@ -422,6 +422,25 @@ class StreamWrapper extends LinksParent
return parent::rename($path_from,$path_to);
}
/**
* Method called for symlink()
*
* Reimplemented to really create (not just fake) an entry directory on the fly
*
* @param string $target
* @param string $link
* @return boolean true on success false on error
*/
static function symlink($target,$link)
{
$parent = new \EGroupware\Api\Vfs\Links\LinksParent();
if (!$parent->url_stat($dir = Vfs::dirname($link),0) && parent::check_extended_acl($dir,Vfs::WRITABLE))
{
$parent->mkdir($dir,0,STREAM_MKDIR_RECURSIVE);
}
return parent::symlink($target,$link);
}
/**
* Register this stream-wrapper
*/