File Fix-ark-cannout-open-rar-file-with-space-in-archive-file-path.patch of Package ark.openSUSE_Leap_42.1_Update

From: Weng Xuetian <wengxt@gmail.com>
Date: Thu, 17 Dec 2015 06:20:36 +0000
Subject: Fix ark cannout open rar file with space in archive file path
X-Git-Url: http://quickgit.kde.org/?p=ark.git&a=commitdiff&h=24b0afbec552f56b30d91fc041fc727add5b6e58
---
Fix ark cannout open rar file with space in archive file path

REVIEW: 126360
---


--- a/plugins/clirarplugin/cliplugin.cpp
+++ b/plugins/clirarplugin/cliplugin.cpp
@@ -172,7 +172,8 @@
     if (m_parseState == ParseStateComment) {
 
         // RegExp matching end of comment field.
-        QRegularExpression rxCommentEnd(QStringLiteral("^Archive: \\S+$"));
+        // FIXME: Comment itself could also contain the Archive path string here.
+        QRegularExpression rxCommentEnd(QStringLiteral("^Archive: .+$"));
 
         if (rxCommentEnd.match(line).hasMatch()) {
             m_parseState = ParseStateHeader;
@@ -293,7 +294,8 @@
     if (m_parseState == ParseStateComment) {
 
         // RegExp matching end of comment field.
-        QRegularExpression rxCommentEnd(QStringLiteral("^(Solid archive|Archive|Volume) \\S+$"));
+        // FIXME: Comment itself could also contain the Archive path string here.
+        QRegularExpression rxCommentEnd(QStringLiteral("^(Solid archive|Archive|Volume) .+$"));
 
         if (rxCommentEnd.match(line).hasMatch()) {
 

openSUSE Build Service is sponsored by