Bug 109355 - adding a photo fails when filename contains '%'
Summary: adding a photo fails when filename contains '%'
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Scan (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-19 22:51 UTC by Xavier Verne
Modified: 2023-04-08 20:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 8.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Verne 2005-07-19 22:51:34 UTC
Version:           0.8.0-cvs (using KDE KDE 3.4.1)
Installed from:    Compiled From Sources
Compiler:          gcc version 3.3.5-20050130 (Gentoo Linux 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1)
OS:                Linux (i686) release 2.6.11-gentoo-r6

_ When starting digikam 0.8.0-cvs from konsole, displays the following error message ;

WARNING: [bool AlbumDB::execSql(const QString&, QStringList*, bool)] sq
lite_compile error: near "%": syntax error on query: REPLACE INTO Images ( capti               on , datetime, name, dirid )  VALUES ('ACD Systems Digital Imaging','2002-02-07T               00:16:16','33-Place30_de_la_Liberte.jpg',%4)

_ No crash => No backtrace
_ How to reproduce
1) have a photo with a name containing a %
2) Put it in an album folder
3) When digikam scans its library, it fails.

_ Expected behaviour
Like in 0.7.3 works correctly

I know i should ask on digikam-devel or users but I'm sure answer is a snap : digikam 0.8.0 says it doesn't know digikamalbums protocol. I don't know what to do...Would help me to finish french GUI and DOC translation on the most uptodate digikam version.
Comment 1 Xavier Verne 2005-07-19 22:53:19 UTC
Oops, forgot to say SQL somehow treats '%' as a special char. May help.
Comment 2 Tom Albers 2005-07-20 13:30:13 UTC
SVN commit 436849 by toma:

This is a nasty bug. The problem is that QString("%1, %2").arg("ab%2").arg("cd"); results in "abcd, %2", so this patch changes it in QString("%1, %2").arg("ab%2", "cd") which should fix this problem. Please check your konsole for errors and better save then sorry: backup your digikam3.db.

CCMAIL: digikam-devel@kde.org
BUG: 109355


 M  +46 -54    albumdb.cpp