mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +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
|
// 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();
|
static::cleanup_missing_paths();
|
||||||
}
|
}
|
||||||
catch (\Exception $e) {
|
catch (\Exception $e) {
|
||||||
|
@ -339,6 +339,11 @@ class Sharing extends \EGroupware\Api\Sharing
|
|||||||
*/
|
*/
|
||||||
protected static function check_path($share)
|
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']);
|
return Vfs::file_exists($share['share_path']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user