mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
fix whole directories where not cleaned up, when deleting old versions and deleted files, changed .versions dir to only contain older versions (no longer deleted files / stuff from .attic too)
This commit is contained in:
parent
2a77e523f5
commit
b4a20773b8
@ -245,8 +245,10 @@ class StreamWrapper implements StreamWrapperIface
|
||||
{
|
||||
self::load_wrapper($scheme);
|
||||
}
|
||||
$url = Vfs::concat($url,substr($parts['path'],strlen($mounted)));
|
||||
|
||||
if (($relative = substr($parts['path'],strlen($mounted))))
|
||||
{
|
||||
$url = Vfs::concat($url,$relative);
|
||||
}
|
||||
// if url contains url parameter, eg. from filesystem streamwrapper, we need to append relative path here too
|
||||
$matches = null;
|
||||
if ($fix_url_query && preg_match('|([?&]url=)([^&]+)|', $url, $matches))
|
||||
|
@ -180,12 +180,17 @@ class filemanager_admin extends filemanager_ui
|
||||
Vfs::find($content['versionedpath'], array(
|
||||
'show-deleted' => true,
|
||||
'hidden' => true,
|
||||
'path_preg' => '#/\.versions/#',
|
||||
'depth' => true,
|
||||
'path_preg' => '#/\.(attic|versions)/#',
|
||||
)+(!(int)$content['ctime'] ? array() : array(
|
||||
'ctime' => ($content['ctime']<0?'-':'+').(int)$content['ctime'],
|
||||
)), function($path) use (&$deleted, &$errors)
|
||||
{
|
||||
if (Vfs::unlink($path))
|
||||
if (Vfs::is_dir($path))
|
||||
{
|
||||
Vfs::rmdir($path);
|
||||
}
|
||||
elseif (Vfs::unlink($path))
|
||||
{
|
||||
++$deleted;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user