Bug 193226 - data loss on downloading photos from camera
Summary: data loss on downloading photos from camera
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: AdvancedRename-Import (show other bugs)
Version: 1.0.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-19 12:32 UTC by Salvatore Brigaglia
Modified: 2017-08-17 06:51 UTC (History)
1 user (show)

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


Attachments
renaming settings on camera gui (112.97 KB, image/jpeg)
2009-05-19 15:56 UTC, Salvatore Brigaglia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Salvatore Brigaglia 2009-05-19 12:32:33 UTC
Version:           0.11.0-svn (rev.: 969913) (using 4.2.85 (KDE 4.2.85 (KDE 4.3 Beta1)) "release 3.2", KDE:KDE4:UNSTABLE:Desktop / openSUSE_Factory)
Compiler:          gcc
OS:                Linux (i686) release 2.6.27.21-0.1-pae

I just experienced a data loss from a Canon EOS 350D.

I downloaded a photo from camera GUI ad usual, then deleted the downloaded photo. No signs of the image on my album. I even tried to search it by data. Nothing.

Then i tried again with gdb running and two raw images just shooted. Again, the firs image downloaded seems gone to /dev/null and the second one is renamed as -1.CR2 (no renaming options set) and cannot be deleted from the Canon camera (while the first one was deleted).
I'll attach gdb output during the operations.
Comment 1 Salvatore Brigaglia 2009-05-19 12:35:44 UTC
(In reply to comment #0)
> I'll attach gdb output during the operations.

Sorry, no great things from gdb, just:
digikam(26169) Digikam::ScanControllerLoadingCacheFileWatch::slotImageChanged: 4463 "/home/tore/Documents/media/Immagini/foto/da_fotocamera/2009_05/-1.CR2" 

other messages where from marble.
Comment 2 caulier.gilles 2009-05-19 12:40:03 UTC
Sound like the renaming operation failed.

What do you use as renaming options? Take a shot of camera gui settings panel to 
be sure and post it to this file. Thanks in advance

Note : here, using, camera file name (without renaming in fact) all work fine. Can you confirm ?

Gilles Caulier
Comment 3 Salvatore Brigaglia 2009-05-19 15:56:17 UTC
Created attachment 33833 [details]
renaming settings on camera gui
Comment 4 Salvatore Brigaglia 2009-05-19 16:01:14 UTC
(In reply to comment #2)
> Sound like the renaming operation failed.
> 

I think i found out. As you can see from the image, "Manual" option was selected. I'm afraid this came as default. But if, by mistake, i would have changed it, camera gui should suggest me to write a name for the file, refusing to write e null name. That's why the second photo was renamed as "-1"! effectively the photo i though i missed was renamed as ".jpeg" creating an hidden file. that's why digikam couldn't find it!

So let me suggest to add a check to camera gui to avoid renaming files to "". I'll check now it the "Manual" did came by default or not.
Comment 5 Salvatore Brigaglia 2009-05-19 16:10:56 UTC
(In reply to comment #4)
> So let me suggest to add a check to camera gui to avoid renaming files to "".
> I'll check now it the "Manual" did came by default or not.

It definitely is the default. I'v just deleted all my config files and camera gui looked just as the jpeg i'v added.
Comment 6 caulier.gilles 2009-05-19 16:13:42 UTC
Yes, i remember a dysfunction like this.

Andi, 

i think manual renaming must provide a default value and must test if renaming scheme is null to prevent this problem...

Gilles
Comment 7 Andi Clemens 2009-05-19 21:13:56 UTC
Either this or you need to check the return from the whole rename sidebar. If it is empty (this is also true for the other renaming possibilities, not only ManualRename), disable the OK / Import button.
But I can add some default, too. Should be just the original filename in this case.

Andi
Comment 8 Andi Clemens 2009-05-19 21:28:51 UTC
Ok done, if nothing is entered, it will return the original filename.

Andi
Comment 9 caulier.gilles 2009-05-19 22:05:33 UTC
Salvatore,

Can you checkout svn and try again ?

Gilles Caulier
Comment 10 Salvatore Brigaglia 2009-05-19 22:31:39 UTC
(In reply to comment #9)
> Salvatore,
> 
> Can you checkout svn and try again ?
> 
> Gilles Caulier

It now saves the photo with the name it have on the camera if "Manual" is selected. Though it still defaults to "Manual"
Comment 11 Salvatore Brigaglia 2009-05-19 22:32:57 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > Salvatore,
> > 
> > Can you checkout svn and try again ?
> > 
> > Gilles Caulier
> 
> It now saves the photo with the name it have on the camera if "Manual" is
> selected. Though it still defaults to "Manual"

err.. if manual is selected AND the textbox is left empty...
Comment 12 Andi Clemens 2009-05-20 00:24:32 UTC
SVN commit 970286 by aclemens:

Default to the first rename method when no config option is present.

CCBUG:193226

 M  +1 -1      renamecustomizer.cpp  


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