diff transform/FileFeatureWriter.cpp @ 615:521438145bd7

More changes related to strict/tolerant URL parsing: * when selecting an output file name for a given input filename: - parse the url in StrictMode; - also, use completeBaseName() rather than baseName() * when writing out a file:/// URL to the audio: - parse the url in StrictMode.
author Christophe Rhodes
date Wed, 07 Oct 2009 16:45:45 +0000
parents 4541581067f3
children 608b4dc5ff34
line wrap: on
line diff
--- a/transform/FileFeatureWriter.cpp	Wed Oct 07 13:10:49 2009 +0000
+++ b/transform/FileFeatureWriter.cpp	Wed Oct 07 16:45:45 2009 +0000
@@ -167,7 +167,7 @@
 
     if (m_stdout) return "";
     
-    QUrl url(trackId);
+    QUrl url(trackId, QUrl::StrictMode);
     QString scheme = url.scheme().toLower();
     bool local = (scheme == "" || scheme == "file" || scheme.length() == 1);
 
@@ -176,7 +176,7 @@
     if (infilename == "") {
         infilename = url.path();
     }
-    basename = QFileInfo(infilename).baseName();
+    basename = QFileInfo(infilename).completeBaseName();
     if (scheme.length() == 1) {
         infilename = scheme + ":" + infilename; // DOS drive!
     }