[Gambas-bugtracker] Bug #1367: FileView.Reload fails to update file sizes

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Fri Jul 20 17:23:56 CEST 2018


http://gambaswiki.org/bugtracker/edit?object=BUG.1367&from=L21haW4-

Tony MOREHEN reported a new bug.

Summary
-------

FileView.Reload fails to update file sizes

Type             : Bug
Priority         : Medium
Gambas version   : Unknown
Product          : Unknown


Description
-----------

Scenario:
Start copying a very large 1GB+ file to the directory Fileview (in detailed mode) is set to, say user.home.
While the file is copying, reload Fileview.  The copying file now appears, with its current size say 400Mb.
When the file has finished copying, reload Fileview again.  File size of copied file stays the same.

Cause:
Fileview uses DirCache to cache the directory it is monitoring.  Calling Fileview.reload by itself does not invalidate this cache so file size changes are not captured by reload.  Fileview's built-in watch function does invalidate the cache so reload will capture new, renamed or deleted files.

More detail:
Fileview.Reload calls RefreshViewLater with the bClear flag set to True.
bClear is used to set the global $bRefreshAll to True and then an asynchronous RefreshView is triggered via the Refresh timer, with bInvalidate effectively set to False.
In RefreshView, $bRefreshAll is only used to force a refresh of the display (iconview or columnview).  It is not used to invalidate the cache.  Only bInvalidate cand invalidate the cache.


System information
------------------

[System]
Gambas=3.10.90
OperatingSystem=Linux
Kernel=4.16.8-1-MANJARO
Architecture=x86_64
Distribution=Manjaro Linux
Desktop=XFCE
Theme=Gtk
Language=en_CA.utf8
Memory=15044M

[Libraries]
Cairo=libcairo.so.2.11512.0
Curl=libcurl.so.4.5.0
DBus=libdbus-1.so.3.19.7
GStreamer=libgstreamer-1.0.so.0.1400.0
GTK+2=libgtk-x11-2.0.so.0.2400.32
GTK+3=libgtk-3.so.0.2200.30
OpenGL=libGL.so.1.0.0
Poppler=libpoppler.so.75.0.0
QT4=libQtCore.so.4.8.7
QT5=libQt5Core.so.5.10.1
SDL=libSDL-1.2.so.0.11.4
SQLite=libsqlite3.so.0.8.6

[Environment]
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DESKTOP_SESSION=xfce
DISPLAY=:0
EDITOR=/usr/bin/nano
GB_GUI=gb.qt4
GDMSESSION=xfce
GLADE_CATALOG_PATH=:
GLADE_MODULE_PATH=:
GLADE_PIXMAP_PATH=:
GTK2_RC_FILES=<home>/.gtkrc-2.0
GTK_MODULES=canberra-gtk-module
HOME=<home>
LANG=en_CA.utf8
LC_ADDRESS=en_CA.UTF-8
LC_IDENTIFICATION=en_CA.UTF-8
LC_MEASUREMENT=en_CA.UTF-8
LC_MONETARY=en_CA.UTF-8
LC_NAME=en_CA.UTF-8
LC_NUMERIC=en_CA.UTF-8
LC_PAPER=en_CA.UTF-8
LC_TELEPHONE=en_CA.UTF-8
LC_TIME=en_CA.UTF-8
LOGNAME=<user>
MAIL=/var/spool/mail/<user>
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
PWD=<home>
QT_QPA_PLATFORMTHEME=qt5ct
SESSION_MANAGER=local/<hostname>:@/tmp/.ICE-unix/931,unix/<hostname>:/tmp/.ICE-unix/931
SHELL=/bin/bash
SHLVL=1
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
TZ=:/etc/localtime
USER=<user>
XAUTHORITY=<home>/.Xauthority
XDG_CONFIG_DIRS=/etc/xdg
XDG_CURRENT_DESKTOP=XFCE
XDG_DATA_DIRS=/usr/local/share:/usr/share
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/<user>
XDG_MENU_PREFIX=xfce-
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_DESKTOP=xfce
XDG_SESSION_ID=c2
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SESSION_TYPE=x11
XDG_VTNR=7
_=/usr/bin/xfce4-session




More information about the Bugtracker mailing list