deals with some rows share_path have "vfs://default" prefix, some are just path

This commit is contained in:
Ralf Becker 2020-03-06 15:08:34 +01:00 committed by nathangray
parent a3d7a83e21
commit 841ac20d80
2 changed files with 3 additions and 5 deletions

View File

@ -794,8 +794,7 @@ 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) {
_egw_log_exception($e); _egw_log_exception($e);

View File

@ -90,9 +90,8 @@ class Sharing extends \EGroupware\Api\Sharing
*/ */
public static function setup_share($keep_session, &$share) public static function setup_share($keep_session, &$share)
{ {
// need to reset fs_tab, as resolve_url does NOT work with just share mounted // need to reset fs_tab, as resolve_url does NOT work with just share mounted
if (count($GLOBALS['egw_info']['server']['vfs_fstab']) <= 1) if (empty($GLOBALS['egw_info']['server']['vfs_fstab']) || count($GLOBALS['egw_info']['server']['vfs_fstab']) <= 1)
{ {
unset($GLOBALS['egw_info']['server']['vfs_fstab']); // triggers reset of fstab in mount() unset($GLOBALS['egw_info']['server']['vfs_fstab']); // triggers reset of fstab in mount()
$GLOBALS['egw_info']['server']['vfs_fstab'] = Vfs::mount(); $GLOBALS['egw_info']['server']['vfs_fstab'] = Vfs::mount();
@ -340,7 +339,7 @@ class Sharing extends \EGroupware\Api\Sharing
*/ */
protected static function check_path($share) protected static function check_path($share)
{ {
return file_exists($share['share_path']); return Vfs::file_exists($share['share_path']);
} }
/** /**