Bug 151321

Summary: Remaining space incorrectly calculated when using symlinks (import from camera)
Product: [Unmaintained] kio Reporter: Michal Kolodziejczyk <miko>
Component: kfileAssignee: Carsten Pfeiffer <pfeiffer>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles
Priority: NOR    
Version: SVN   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In: 1.0.0
Sentry Crash Report:

Description Michal Kolodziejczyk 2007-10-25 11:08:10 UTC
Version:           0.9.3beta1 (using KDE KDE 3.5.8)
Installed from:    Unspecified Linux
Compiler:          gcc 
OS:                Linux

My album storage path is /home/user/Pictures/, and I have /home/user/Pictures/Incoming symlinked to /mnt/largestorage. Since version 0.9.3beta1 I cannot import my images from camera to /home/user/Pictures/Incoming because digikam warns me there is not enough room.
And indeed, there is not enough room on the root "/" partition, but there is plenty of room in /mnt/largestorage.
So I would like to be able to switch off the option to check the remaining size, or to have another button or checkbox in error dialog "force to download images" or similar.
Comment 1 Arnd Baecker 2007-10-25 12:12:53 UTC
Would it be possible to check the remaining space on the drive
onto which new images will be downloaded?
(This would mean to resolve the physical drive from any possible symlink,
right?)
Comment 2 Michal Kolodziejczyk 2007-10-25 13:23:05 UTC
There is another problem: many of the images on the camera card are also on the disk. Let suppose that I have 990 MB of images on my camera card also on my disk, and there is one 1MB new photo on the camera, and I have 2 MB of free space on my partition. And now I want co import all images from the camera (overwriting my 990MB images on disk with the same images from the camera). Digikam would think I need 991 MB of free space, while in fact I need only 1 MB. So to calculate the remaining space properly, the size of images "to be overwritten" should be substracted from the total required space.
Comment 3 caulier.gilles 2008-12-05 14:07:04 UTC
This problem depand of KDE API which is used to compute free space : they do not include symlinks support, or do not have option relevant.

The KDELibs objects used for that are :

- KDiskFreeSp (KDE3) : 

http://api.kde.org/3.5-api/kdelibs-apidocs/kio/kfile/html/classKDiskFreeSp.html

- KDiskFreeSpace (KDE4.1) :

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

- KDiskFreeSpaceInfo (KDE 4.2) : 

http://websvn.kde.org/trunk/KDE/kdelibs/kio/kfile/kdiskfreespace.h?view=markup

Note : with digiKam for KDE4, you don 't need to use symlink with your album root path. We support multiple root albums...

I will re-assign this file to KDELibs/kio

Gilles

Gilles Caulier
Comment 4 Michal Kolodziejczyk 2009-05-02 01:30:07 UTC
Works OK with recent versions. Thanks!