Version: unspecified OS: Linux dolphin displays free space on the right side of the status bar. On samba shares the bar is empty with Unknown size label. Reproducible: Didn't try OS: Linux (i686) release 2.6.32-0206321505-generic Compiler: cc
@Peter: Is this information available trough the SMB protocol?
> @Peter: Is this information available trough the SMB protocol? @FiNeX: I don't know :-( Dolphin uses KDiskFreeSpaceInfo for getting this information. I had a short look at the code, but I'm not sure. I guess David or Sebastian might be able to answer this question off the bat.
I don't know enough about the SMB protocol to answer this. If SMB provides this info, then we also have to make it available as a kioslave special() command, but that's the 2nd step (which I can do). First step: how could kio_smb find out the available space on a share? Reassigning to kio_smb.
After some googling I've found the following links: http://www.protocols.com/pbook/ibm.htm#SMB http://www.protocolbase.net/protocols/protocol_SMB.php They talk about "[get server info] Get total and free space for server disk." Could this info be useful in some way?
smbclient shows the free space on remote shares (I just checked in interactive mode) It outputs it in a bit strange way, but it's correct: "34175 blocks of size 8388608. 2269 blocks available" 8388608 = 8192 * 1024, so each block is 8MB I have absolutely no idea why it uses 8MB blocks, but that's not the point :)
Sorry to comment on such an old bug, but this is still not implemented in KDE 4.12. I know this can be done as I've done it myself using libsmbclient. Here is an example implementation that works just fine: void auth_fn(const char *server, const char *share, char *workgroup, int wgmaxlen, char *username, int unmaxlen, char *password, int pwmaxlen) { strcpy(username, "guest"); } bool calculateSMBSpace(char *url, unsigned long long &spaceTotal, unsigned long long &spaceFree) { int err = smbc_init(auth_fn, 0); if (err < 0) { return false; } int handle = smbc_opendir(url); if(handle < 0) { return false; } struct statvfs dirStat; err = smbc_fstatvfs(handle, &dirStat); smbc_closedir(handle); if (err < 0) { return false; } spaceTotal = dirStat.f_bsize * dirStat.f_blocks; spaceFree = dirStat.f_bsize * dirStat.f_bavail; return true; } I would write the implementation myself, but I don't know my way around the KDE code too well and I'm not sure if libsmbclient is cross-platform which might mean that some OSes would be left out.
I really miss this information.
Git commit 7651cdccb204d6a4ae7157695bf4c925701a18c5 by Mathias Tillman. Committed on 14/09/2014 at 16:53. Pushed by mathiastillman into branch 'frameworks'. Make the statusbar space info use the new KIO::fileSystemFreeSpace job. REVIEW: 120137 M +18 -11 dolphin/src/statusbar/mountpointobserver.cpp M +13 -15 dolphin/src/statusbar/mountpointobserver.h M +23 -18 dolphin/src/statusbar/mountpointobservercache.cpp M +4 -4 dolphin/src/statusbar/mountpointobservercache.h M +31 -35 dolphin/src/statusbar/spaceinfoobserver.cpp M +9 -1 dolphin/src/statusbar/spaceinfoobserver.h M +1 -1 dolphin/src/statusbar/statusbarspaceinfo.cpp http://commits.kde.org/kde-baseapps/7651cdccb204d6a4ae7157695bf4c925701a18c5