[Bug 132407] a gallery with two images whose names differ only in
the extension give two identical thumbnails
Martin Koller
m.koller at surfeu.at
Sat Jan 6 17:08:21 CET 2007
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
http://bugs.kde.org/show_bug.cgi?id=132407
m.koller surfeu at changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From m.koller surfeu at 2007-01-06 17:08 -------
SVN commit 620556 by mkoller:
BUG: 132407
Don't trim filename extensions to avoid filename clash with two files
having the same name but different filetypes (extension)
Patch provided by Olivier Trichet
M +3 -4 imgalleryplugin.cpp
--- branches/KDE/3.5/kdeaddons/konq-plugins/kimgalleryplugin/imgalleryplugin.cpp #620555:620556
@ -202,8 +202,7 @
if (createThumb(imgName, sourceDirName, imgGalleryDir, imageFormat)) {
- const QString imgNameFormat = imgName.left(imgName.findRev('.',-1));
- const QString imgPath("thumbs/" + imgNameFormat + extension(imageFormat));
+ const QString imgPath("thumbs/" + imgName + extension(imageFormat));
stream << "<img src=\"" << imgPath << "\" width=\"" << m_imgWidth << "\" ";
stream << "height=\"" << m_imgHeight << "\" alt=\"" << imgPath << "\"/>";
m_progressDlg->setLabelText( i18n("Created thumbnail for: \n%1").arg(imgName) );
@ -356,7 +355,7 @
// ..all the thumbnails ..
for (uint i=0; i < imageDir.count(); i++) {
const QString imgName = imageDir[i];
- const QString imgNameFormat = imgName.left(imgName.findRev('.',-1)) + extension(imageFormat);
+ const QString imgNameFormat = imgName + extension(imageFormat);
bool isRemoved = thumb_dir.remove(imgNameFormat);
kdDebug(90170) << "removing: " << thumb_dir.path() << "/" << imgNameFormat << "; "<< isRemoved << endl;
}
@ -435,7 +434,7 @
KIO::NetAccess::copy(srcURL, destURL, static_cast<KParts::Part *>(parent())->widget());
}
- const QString imgNameFormat = imgName.left( imgName.findRev('.',-1) ) + extension(imageFormat);
+ const QString imgNameFormat = imgName + extension(imageFormat);
const QString thumbDir = imgGalleryDir + QString::fromLatin1("/thumbs/");
int extent = m_configDlg->getThumbnailSize();
More information about the pkg-kde-bugs-fwd
mailing list