OSDN Git Service

Fixed lamexp_clean_filename() to also handle double-quote characters.
authorLoRd_MuldeR <mulder2@gmx.de>
Tue, 16 Apr 2013 20:43:52 +0000 (22:43 +0200)
committerLoRd_MuldeR <mulder2@gmx.de>
Tue, 16 Apr 2013 20:43:52 +0000 (22:43 +0200)
src/Config.h
src/Global.cpp

index 9e01ec1..e4f367e 100644 (file)
@@ -29,8 +29,8 @@
 #define VER_LAMEXP_MINOR_HI                                    0
 #define VER_LAMEXP_MINOR_LO                                    7
 #define VER_LAMEXP_TYPE                                                RC
-#define VER_LAMEXP_PATCH                                       1
-#define VER_LAMEXP_BUILD                                       1273
+#define VER_LAMEXP_PATCH                                       2
+#define VER_LAMEXP_BUILD                                       1274
 
 ///////////////////////////////////////////////////////////////////////////////
 // Tool versions (minimum expected versions!)
index dd8cb16..ed3ba03 100644 (file)
@@ -2177,7 +2177,9 @@ void lamexp_blink_window(QWidget *poWindow, unsigned int count, unsigned int del
 const QString lamexp_clean_filename(const QString &str)
 {
        QString newStr(str);
-       
+       QRegExp rx("\"(.+)\"");
+       rx.setMinimal(true);
+
        newStr.replace("\\", "-");
        newStr.replace(" / ", ", ");
        newStr.replace("/", ",");
@@ -2187,6 +2189,8 @@ const QString lamexp_clean_filename(const QString &str)
        newStr.replace("<", "[");
        newStr.replace(">", "]");
        newStr.replace("|", "!");
+       newStr.replace(rx, "`\\1ยด");
+       newStr.replace("\"", "'");
        
        return newStr.simplified();
 }