[Bug 125688] fails to properly play files with names containing '#' character

Christoph Pfister christophpfister at gmail.com
Sat Feb 17 12:35:32 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=125688         
christophpfister gmail com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From christophpfister gmail com  2007-02-17 12:35 -------
SVN commit 634455 by pfister:

fix bug with file names containing #
patch based on comment #9 but without (hopefully) introducing any regressions
BUG: 125688


 M  +8 -13     kaffeine.cpp  


--- trunk/extragear/multimedia/kaffeine/src/kaffeine.cpp #634454:634455
 @ -302,7 +302,7  @
 			url = path.absFilePath(url);
 #endif
 		}
-		urls.append(url);
+		urls.append(KURL::fromPathOrURL(url).url());
 	}
 	loadTMP(urls);
 
 @ -1159,20 +1159,15  @
 		fileFilter.prepend(DEFAULT_FILTER);
 
 	KURL::List kurlList = KFileDialog::getOpenURLs(":kaffeine_openFile", fileFilter, 0, i18n("Open File(s)"));
+
+	for (KURL::List::Iterator it = kurlList.begin(); it != kurlList.end(); ++it)
+		if ((*it).isLocalFile() && (*it).path().endsWith(".iso", false))
+			(*it).setProtocol("dvd");
+
 	QStringList urlList = kurlList.toStringList();
-	for ( QStringList::Iterator it = urlList.begin(); it != urlList.end(); ++it )
-	{
-		KURL suburl = *it;
-		if (suburl.protocol() == "file")
-			*it = suburl.path();
-		if ( suburl.path().endsWith(".iso",false) ) {
-			*it = suburl.path().prepend("dvd://");
-		}
 
-	}
-	if (!urlList.count())
-		return;
-	load(urlList);
+	if (urlList.count() > 0)
+		load(urlList);
 }
 
 void Kaffeine::slotTogglePlaylist()



More information about the pkg-kde-bugs-fwd mailing list