[Gambas-bugtracker] Bug #1959: Feature request: Add Device property to Stat class

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Mon Nov 9 17:56:47 CET 2020


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

Tony MOREHEN reported a new bug.

Summary
-------

Feature request: Add Device property to Stat class

Type             : Bug
Priority         : High
Gambas version   : Master
Product          : Unknown


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

Glibc's stat structure includes a st_dev field (integer).  This field returns the id of the device containing the file.  Adding this field to Gambas's stat class would be useful.  For example, you intend to use Gambas's move command on a file.  This would generate a "System error #18: Invalid cross-device link" when you try to move across file systems/devices.  You could avoid this error if you could check device id's with stat before running the move command.

Btw, linux's stat command reports the device id.


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

[System]
Gambas=3.15.90
OperatingSystem=Linux
Kernel=5.9.3-1-MANJARO
Architecture=x86_64
Distribution=Manjaro Linux
Desktop=XFCE
Theme=qt5ctproxy
Language=en_CA.utf8
Memory=5892M

[Libraries]
Cairo=libcairo.so.2.11703.0
Curl=libcurl.so.4.7.0
DBus=libdbus-1.so.3.19.13
GDK2=libgdk-x11-2.0.so.0.2400.32
GDK3=libgdk-3.so.0.2404.19
GStreamer=libgstreamer-1.0.so.0.1801.0
GTK+2=libgtk-x11-2.0.so.0.2400.32
GTK+3=libgtk-3.so.0.2404.19
OpenGL=libGL.so.1.7.0
Poppler=libpoppler.so.103.0.0
QT4=libQtCore.so.4.8.7
QT5=libQt5Core.so.5.15.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-AJMSoftware
DISPLAY=:0
EDITOR=/usr/bin/nano
GB_GUI=gb.qt5
GDMSESSION=xfce-AJMSoftware
GTK2_RC_FILES=<home>/.gtkrc-2.0
GTK_MODULES=canberra-gtk-module:canberra-gtk-module
GTK_OVERLAY_SCROLLING=0
HOME=<home>
LANG=en_CA.utf8
LC_ADDRESS=en_CA.UTF-8
LC_ALL=en_CA.utf8
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>
MOTD_SHOWN=pam
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
PATH=<home>/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
PWD=<home>
QT_AUTO_SCREEN_SCALE_FACTOR=0
QT_LOGGING_RULES=*.debug=false
QT_QPA_PLATFORMTHEME=qt5ct
SESSION_MANAGER=local/<hostname>:@/tmp/.ICE-unix/39861,unix/<hostname>:/tmp/.ICE-unix/39861
SHELL=/bin/bash
SHLVL=1
SSH_AGENT_PID=39885
SSH_AUTH_SOCK=/tmp/ssh-6ZGtqu8A7Wtq/agent.39884
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_CLASS=user
XDG_SESSION_DESKTOP=xfce-AJMSoftware
XDG_SESSION_ID=24
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session10
XDG_SESSION_TYPE=x11
XDG_VTNR=7
_=/usr/bin/gambas3
force_s3tc_enable=true




More information about the Bugtracker mailing list