Filemanager: Push was not correctly updating file list when directory was added/deleted

This commit is contained in:
nathan 2023-06-05 11:56:06 -06:00
parent dd4a2de988
commit e7e9c6fa22
3 changed files with 4 additions and 3 deletions

View File

@ -354,7 +354,7 @@ class filemanager_hooks
$stat = isset($data['stat']) ? $data['stat'] : Vfs::stat($path); $stat = isset($data['stat']) ? $data['stat'] : Vfs::stat($path);
// we ignore notifications about zero size files, created by some WebDAV clients prior to every real update! // we ignore notifications about zero size files, created by some WebDAV clients prior to every real update!
if($stat['size'] || Vfs::is_dir($path)) if($stat['size'] || Vfs::is_dir($path) || in_array($data['location'], ['vfs_rmdir', 'vfs_unlink']))
{ {
self::push($data, $stat); self::push($data, $stat);
} }

View File

@ -1019,6 +1019,7 @@ class filemanager_ui
if($query['col_filter']['path'] && $vfs_options['name']) if($query['col_filter']['path'] && $vfs_options['name'])
{ {
// Query the requested path, in case it's nested // Query the requested path, in case it's nested
$query['col_filter']['path'][] = $query['path'];
foreach($query['col_filter']['path'] as $filter_path) foreach($query['col_filter']['path'] as $filter_path)
{ {
$query['col_filter']['dir'][] = Vfs::is_dir($filter_path) ? $filter_path : Vfs::dirname($filter_path); $query['col_filter']['dir'][] = Vfs::is_dir($filter_path) ? $filter_path : Vfs::dirname($filter_path);

View File

@ -20,7 +20,7 @@ import {et2_nextmatch_controller} from "../../api/js/etemplate/et2_extension_nex
import {egw} from "../../api/js/jsapi/egw_global"; import {egw} from "../../api/js/jsapi/egw_global";
import {et2_selectbox} from "../../api/js/etemplate/et2_widget_selectbox"; import {et2_selectbox} from "../../api/js/etemplate/et2_widget_selectbox";
import {et2_textbox} from "../../api/js/etemplate/et2_widget_textbox"; import {et2_textbox} from "../../api/js/etemplate/et2_widget_textbox";
import {ExposeMixin, MIME_REGEX} from "../../api/js/etemplate/Expose/ExposeMixin"; import {MIME_REGEX} from "../../api/js/etemplate/Expose/ExposeMixin";
/** /**
* UI for filemanager * UI for filemanager
@ -823,7 +823,7 @@ export class filemanagerAPP extends EgwApp
*/ */
_do_action_callback(_data) _do_action_callback(_data)
{ {
if(_data.action == "delete" && this.egw.pushAvailable()) if(this.egw.pushAvailable())
{ {
// No need to refresh, push will handle it // No need to refresh, push will handle it
this.egw.message(_data.msg) this.egw.message(_data.msg)