Wrong destination storage size detected
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Rapid Photo Downloader |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I use the application in an ubuntu container deployed on QNAP NAS, to download photos from SD card directly to the NAS disks. So far everything worked perfectly with a very ancient version of Rapid Photo Downloader. Now I updated things, moved to a new container and installed new Rapid Photo, which has some issues.
The Rapid Photo Downloader does not detect the size of the destination storage correctly. I do have a few terabyte disks, they are in the mirror and I can use them, upload on them, etc. The application detects only 16Mb free from 17Mb - see attached screenshot. This allows me to download a photo. When it is finished I can do the next one, and next one, and next one.....
Where does this come from? It seems that the disk sizes for the application are not correctly gathered. In the container, there are mounts for all shares from NAS and they appear in /nas_share folder. This folder is mounted as at /.share point. The `df` also says that this `/.share` has only 16MB, but all the folders inside are new/different mounts. As it is possible to directly download into the container I tried to trick the application with a symbolic link of one folder which is on NAS disks. This actually crashes the directory tree listing in the Rapid Photo Downloader.
Currently, the only option is to upload something to the container, and then move at the final destination.
You answered your own question when you use the command df. No application can magically determine prior to download what the available storage space is when it doesn't know which subfolders precisely the files will be downloaded to. All it can go with is the size of the volume the destination is located in, which 99.9% of the time will be the same volume as its subfolders.
The code in question is found here:
https:/ /github. com/damonlynch/ rapid-photo- downloader/ blob/main/ raphodo/ storage. py#L1721
It's using standard system calls. Nothing fancy.
The first thing you need to do is set up your NAS / container so that the actual size of the storage medium used is correctly reported. Download to a destination folder *inside* the actual destination storage medium, not the mount point in which it is residing:
/media * DO NOT CHOOSE THIS * photo_destinati on_storage/ photos * CHOOSE SOMETHING LIKE THIS *
/media/