Bug 151321 - Remaining space incorrectly calculated when using symlinks (import from camera)
Summary: Remaining space incorrectly calculated when using symlinks (import from camera)
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: kfile (show other bugs)
Version: SVN
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Carsten Pfeiffer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-25 11:08 UTC by Michal Kolodziejczyk
Modified: 2012-06-27 11:07 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 1.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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!