Version: unknown (using KDE 3.5.1, compiled sources) Compiler: Target: x86_64-linux-gnu OS: Linux (x86_64) release 2.6.13.2 To reproduce: 1) in konqueror create a dir with the name "foo/bar" (yes, including the slash) 2) copy an image into the new dir 3) still in konq, open image in krita (using open with since krita seems to not be listed most of the times). You get a dialog that says: Could not open /home/zander/foo%252fbar/image.png. Reason: Cannot create storage Note that I have no idea where the %252 comes from; an ls states that the dir is actally 'foo%2fbar'. Where did that 52 come from??
/ = %2f but % = %25 so %2f = %252f
> / = %2f > but % = %25 > so %2f = %252f I guess the bug here is a path/url confusion in krita, since it shouldn't care that the directory is actually called foo%2fbar on disk. But by extracting a path wrongly (e.g. removing ("file:/") from a URL), you get a wrongly encoded path (same problem would happen with '#' in the path).
I'll set the product to Krita and assign the bug to our fearless png import filter maintainer. Cyrille: could you also check jpeg and tiff?
imagemagick has also the problem ;)
SVN commit 523602 by berger: fix opening of weird directory (or filename) with a "/" (thanks to david) BUG:123953 M +3 -1 jpeg/kis_jpeg_converter.cc M +2 -1 jpeg/kis_jpeg_export.cc M +2 -1 jpeg/kis_jpeg_import.cc M +3 -1 magick/kis_image_magick_converter.cc M +2 -1 magick/magickexport.cpp M +2 -1 magick/magickimport.cpp M +5 -1 png/kis_png_converter.cc M +2 -1 png/kis_png_export.cc M +2 -1 png/kis_png_import.cc M +3 -1 tiff/kis_tiff_converter.cc M +2 -1 tiff/kis_tiff_export.cc M +2 -1 tiff/kis_tiff_import.cc --- branches/koffice/1.5/koffice/filters/krita/jpeg/kis_jpeg_converter.cc #523601:523602 @@ -331,7 +331,9 @@ QString tmpFile; if (KIO::NetAccess::download(uri, tmpFile, qApp -> mainWidget())) { - result = decode(tmpFile); + KURL uriTF; + uriTF.setPath( tmpFile ); + result = decode(uriTF); KIO::NetAccess::removeTempFile(tmpFile); } --- branches/koffice/1.5/koffice/filters/krita/jpeg/kis_jpeg_export.cc #523601:523602 @@ -118,7 +118,8 @@ if (filename.isEmpty()) return KoFilter::FileNotFound; - KURL url(filename); + KURL url; + url.setPath(filename); KisImageSP img = output->currentImage(); Q_CHECK_PTR(img); --- branches/koffice/1.5/koffice/filters/krita/jpeg/kis_jpeg_import.cc #523601:523602 @@ -61,7 +61,8 @@ if (!filename.isEmpty()) { - KURL url(filename); + KURL url; + url.setPath(filename); if (url.isEmpty()) return KoFilter::FileNotFound; --- branches/koffice/1.5/koffice/filters/krita/magick/kis_image_magick_converter.cc #523601:523602 @@ -615,7 +615,9 @@ QString tmpFile; if (KIO::NetAccess::download(uri, tmpFile, qApp -> mainWidget())) { - result = decode(tmpFile, false); + KURL uriTF; + uriTF.setPath( tmpFile ); + result = decode(uriTF, false); KIO::NetAccess::removeTempFile(tmpFile); } --- branches/koffice/1.5/koffice/filters/krita/magick/magickexport.cpp #523601:523602 @@ -56,7 +56,8 @@ if (filename.isEmpty()) return KoFilter::FileNotFound; - KURL url(filename); + KURL url; + url.setPath(filename); KisImageSP img = output->currentImage(); --- branches/koffice/1.5/koffice/filters/krita/magick/magickimport.cpp #523601:523602 @@ -61,7 +61,8 @@ if (!filename.isEmpty()) { - KURL url(filename); + KURL url; + url.setPath(filename); if (url.isEmpty()) return KoFilter::FileNotFound; --- branches/koffice/1.5/koffice/filters/krita/png/kis_png_converter.cc #523601:523602 @@ -122,6 +122,7 @@ { kdDebug(41008) << "Start decoding PNG File" << endl; // open the file + kdDebug(41008) << QFile::encodeName(uri.path()) << " " << uri.path() << " " << uri << endl; FILE *fp = fopen(QFile::encodeName(uri.path()), "rb"); if (!fp) { @@ -411,6 +412,7 @@ KisImageBuilder_Result KisPNGConverter::buildImage(const KURL& uri) { + kdDebug(41008) << QFile::encodeName(uri.path()) << " " << uri.path() << " " << uri << endl; if (uri.isEmpty()) return KisImageBuilder_RESULT_NO_URI; @@ -423,7 +425,9 @@ QString tmpFile; if (KIO::NetAccess::download(uri, tmpFile, qApp -> mainWidget())) { - result = decode(tmpFile); + KURL uriTF; + uriTF.setPath( tmpFile ); + result = decode(uriTF); KIO::NetAccess::removeTempFile(tmpFile); } --- branches/koffice/1.5/koffice/filters/krita/png/kis_png_export.cc #523601:523602 @@ -80,7 +80,8 @@ if (filename.isEmpty()) return KoFilter::FileNotFound; - KURL url(filename); + KURL url; + url.setPath(filename); KisImageSP img = output->currentImage(); --- branches/koffice/1.5/koffice/filters/krita/png/kis_png_import.cc #523601:523602 @@ -61,7 +61,8 @@ if (!filename.isEmpty()) { - KURL url(filename); + KURL url; + url.setPath(filename); if (url.isEmpty()) return KoFilter::FileNotFound; --- branches/koffice/1.5/koffice/filters/krita/tiff/kis_tiff_converter.cc #523601:523602 @@ -595,7 +595,9 @@ QString tmpFile; if (KIO::NetAccess::download(uri, tmpFile, qApp -> mainWidget())) { - result = decode(tmpFile); + KURL uriTF; + uriTF.setPath( tmpFile ); + result = decode(uriTF); KIO::NetAccess::removeTempFile(tmpFile); } --- branches/koffice/1.5/koffice/filters/krita/tiff/kis_tiff_export.cc #523601:523602 @@ -76,7 +76,8 @@ if (filename.isEmpty()) return KoFilter::FileNotFound; - KURL url(filename); + KURL url; + url.setPath(filename); KisImageSP img; --- branches/koffice/1.5/koffice/filters/krita/tiff/kis_tiff_import.cc #523601:523602 @@ -61,7 +61,8 @@ if (!filename.isEmpty()) { - KURL url(filename); + KURL url; + url.setPath(filename); if (url.isEmpty()) return KoFilter::FileNotFound;