mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
deals with some rows share_path have "vfs://default" prefix, some are just path
This commit is contained in:
parent
4c987e7dd8
commit
4fe466f4f9
@ -794,7 +794,6 @@ class Sharing
|
||||
}
|
||||
|
||||
// Now check the remaining shares
|
||||
/* temporary disabled, as the check does not correctly check user permissions nor account for pathes without vfs prefix*/
|
||||
static::cleanup_missing_paths();
|
||||
}
|
||||
catch (\Exception $e) {
|
||||
|
@ -339,6 +339,11 @@ class Sharing extends \EGroupware\Api\Sharing
|
||||
*/
|
||||
protected static function check_path($share)
|
||||
{
|
||||
// remove VFS::PREFIX (vfs://default), as Vfs::file_exists returns false if path does NOT start with a /
|
||||
if ($share['share_path'][0] !== '/')
|
||||
{
|
||||
$share['share_path'] = Api\Vfs::parse_url($share['share_path'], PHP_URL_PATH);
|
||||
}
|
||||
return Vfs::file_exists($share['share_path']);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user