[Digikam-devel] [Bug 136927] Failed to download file DCP_4321.jpg. Do you want to continue? and when continue is clicked the same warning comes for the next image and so on. tnx.
Gilles Caulier
caulier.gilles at gmail.com
Tue Sep 4 10:03:44 BST 2007
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=136927
caulier.gilles gmail com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From caulier.gilles gmail com 2007-09-04 11:03 -------
SVN commit 708236 by cgilles:
digiKam from trunk (KDE4) : backport commits # 708234 from KDE3 branch
BUG: 136927
M +13 -18 cameraui.cpp
M +1 -1 cameraui.h
--- trunk/extragear/graphics/digikam/utilities/cameragui/cameraui.cpp #708235:708236
@ -23,17 +23,6 @
*
* ============================================================ */
-#define CAMERA_INFO_MENU_ID 255
-
-// C Ansi includes.
-
-extern "C"
-{
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-}
-
// Qt includes.
#include <QMenu>
@ -1351,6 +1340,9 @
break;
}
+ // See B.K.O #136927 : we need to support file system which do not
+ // handle upper case properly.
+ dirName = dirName.toLower();
if (!createAutoAlbum(url, dirName, dateTime.date(), errMsg))
{
KMessageBox::error(this, errMsg);
@ -1379,6 +1371,9 @
fi.suffix().toUpper() == QString("MPO"))
subAlbum = QString("MPG");
+ // See B.K.O #136927 : we need to support file system which do not
+ // handle upper case properly.
+ subAlbum = subAlbum.toLower();
if (!createAutoAlbum(u, subAlbum, dateTime.date(), errMsg))
{
KMessageBox::error(this, errMsg);
@ -1751,23 +1746,23 @
d->rightSidebar->slotNoCurrentItem();
}
-bool CameraUI::createAutoAlbum(const KUrl& parentURL, const QString& name,
+bool CameraUI::createAutoAlbum(const KUrl& parentURL, const QString& sub,
const QDate& date, QString& errMsg)
{
KUrl u(parentURL);
- u.addPath(name);
+ u.addPath(sub);
// first stat to see if the album exists
- struct stat buf;
- if (::stat(QFile::encodeName(u.path()), &buf) == 0)
+ QFileInfo info(u.path());
+ if (info.exists())
{
// now check if its really a directory
- if (S_ISDIR(buf.st_mode))
+ if (info.isDir())
return true;
else
{
errMsg = i18n("A file with same name (%1) exists in folder %2",
- name, parentURL.path());
+ sub, parentURL.path());
return false;
}
}
@ -1783,7 +1778,7 @
}
QString albumRootPath = CollectionManager::instance()->albumRootPath(parentURL);
- return aman->createPAlbum(parent, albumRootPath, name, QString(""), date, QString(""), errMsg);
+ return aman->createPAlbum(parent, albumRootPath, sub, QString(""), date, QString(""), errMsg);
}
void CameraUI::addFileExtension(const QString& ext)
--- trunk/extragear/graphics/digikam/utilities/cameragui/cameraui.h #708235:708236
@ -96,7 +96,7 @
void readSettings();
void saveSettings();
- bool createAutoAlbum(const KUrl& parentURL, const QString& name,
+ bool createAutoAlbum(const KUrl& parentURL, const QString& sub,
const QDate& date, QString& errMsg);
void addFileExtension(const QString& ext);
More information about the Digikam-devel
mailing list