Bug 175925 - USB Storage size (and Local disk) are wrong
Summary: USB Storage size (and Local disk) are wrong
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Import-UMS (show other bugs)
Version: 0.10.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-23 20:25 UTC by Blindauer Emmanuel
Modified: 2017-08-16 09:27 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Wrong disk size listed (52.61 KB, image/png)
2008-12-01 08:55 UTC, Joe Biden
Details
first wrong value (155.98 KB, image/png)
2008-12-01 10:25 UTC, Blindauer Emmanuel
Details
second wrong value (146.82 KB, image/png)
2008-12-01 10:25 UTC, Blindauer Emmanuel
Details
image with the vrong values (71.37 KB, image/png)
2008-12-08 18:43 UTC, Salvatore Brigaglia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Blindauer Emmanuel 2008-11-23 20:25:58 UTC
Version:           Version 0.10.0-beta5 (using Devel)
OS:                Linux
Installed from:    Compiled sources

Pluggins My 2Go Card, it is mounted under my linux. the correct size is:

/dev/sdi1              2009216    167648   1841568   9% /media/disk

The card is said to have a capacity of 1T (USB STORAGE)
which is wrong.

Downloading the pictures, I see that the size related to the filesystem is wrong too:

Capacity: 42,9Go
Available: 2,8To
Needed: 323Mo

My filesystem reports the following values:
$ df -k :
sophie:/home/blindaue 184599808 160690816  23908992  88% /home/blindaue
Comment 1 caulier.gilles 2008-11-23 20:42:02 UTC
If i'm not too wrong, MArcel has fixed this problem this week end. Please chaeck with current implementation from svn (beta6)

Gilles Caulier
Comment 2 Joe Biden 2008-12-01 08:55:35 UTC
Created attachment 28969 [details]
Wrong disk size listed
Comment 3 caulier.gilles 2008-12-01 09:35:10 UTC
Brendan,

If i'm not too wrong, Marcel has fixed this problem with 0.10.0-beta6. Can you try again with recent code ?

Gilles Caulier
Comment 4 Blindauer Emmanuel 2008-12-01 10:20:39 UTC
I'm using digikam-0.10.0-1.beta6.3mdv2009.1 and the bug is not fully corrected.
The displayed size of USB Storage is ok now, but when importing photos, in the status bar of the opened window.
Comment 5 Blindauer Emmanuel 2008-12-01 10:22:11 UTC
I'm using digikam-0.10.0-1.beta6.3mdv2009.1 and the bug is not fully corrected. The displayed size of USB Storage is ok now, but when importing photos, in the status bar of the opened window there are still wrong values.
Comment 6 Blindauer Emmanuel 2008-12-01 10:25:19 UTC
Created attachment 28973 [details]
first wrong value
Comment 7 Blindauer Emmanuel 2008-12-01 10:25:44 UTC
Created attachment 28974 [details]
second wrong value
Comment 8 Joe Biden 2008-12-01 15:29:02 UTC
Gilles, code I was using was current to the hour.
Comment 9 Marcel Wiesweg 2008-12-01 19:44:09 UTC
Gilles, looking at the code it seems all these values and the textual representation come directly from KDiskFreeSpace and KIO conversion methods. Nothing we did wrong here?
Comment 10 Salvatore Brigaglia 2008-12-08 18:43:58 UTC
Created attachment 29149 [details]
image with the vrong values
Comment 11 Salvatore Brigaglia 2008-12-08 18:45:10 UTC
The same problem persist with revision 894457 (08/12/2008).

I'v also created an attachement wit a screenshot.
Comment 12 Mikolaj Machowski 2008-12-08 23:22:27 UTC
Also confirming with yesterday code.
Comment 13 caulier.gilles 2008-12-09 09:48:07 UTC
To Marcel #9,

Definitively yes... We use KDiskFreeSpace to scan media information. Values are returned by this method :

http://api.kde.org/4.x-api/kdelibs-apidocs/kio/html/classKDiskFreeSpace.html#a600e0b7c5a3c5dfe8af4f3f8df94e9d

Which return sizes in KibiByte (http://en.wikipedia.org/wiki/Kibibyte)

After, value are displayed using KIO::convertSizeFromKiB :

http://api.kde.org/4.x-api/kdelibs-apidocs/kio/html/namespaceKIO.html#5f45b12d68e8c5c62646ed6f239909c8

So, I don't understand where is the problem. Sound like a KDE API problem ?

Gilles
Comment 14 caulier.gilles 2008-12-09 10:01:31 UTC
To all, 

Which KDE version you use ? Here using KDE 4.1.2, i cannot reproduce the dysfunction.

Gilles
Comment 15 Salvatore Brigaglia 2008-12-09 16:12:18 UTC
Qt: 4.4.3
KDE: 4.1.82 (KDE 4.1.82 (KDE 4.2 >= 20081204)) "release 3.1"
kde4-config: 1.0

digiKam 0.10.0-beta7 (svn of the 08 December)
Comment 16 caulier.gilles 2008-12-16 22:07:49 UTC
SVN commit 897807 by cgilles:

api between KDE 4.1 and KDE 4.2 is slitly different and media size unit returned by KDE api have been changed from KBytes to Bytes
BUG: 175925


 M  +4 -1      freespacewidget.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=897807