[arch-commits] Commit in xarchiver/trunk (PKGBUILD rar5-withespace.patch)
Balló György
bgyorgy at nymeria.archlinux.org
Sun May 11 14:06:48 UTC 2014
Date: Sunday, May 11, 2014 @ 16:06:47
Author: bgyorgy
Revision: 110969
upgpkg: xarchiver 0.5.3-2
Fix RAR5 files containing white space (FS#40288)
Added:
xarchiver/trunk/rar5-withespace.patch
Modified:
xarchiver/trunk/PKGBUILD
-----------------------+
PKGBUILD | 11 ++++++++---
rar5-withespace.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-05-11 13:00:43 UTC (rev 110968)
+++ PKGBUILD 2014-05-11 14:06:47 UTC (rev 110969)
@@ -5,7 +5,7 @@
pkgname=xarchiver
pkgver=0.5.3
-pkgrel=1
+pkgrel=2
pkgdesc="GTK+ frontend to various command line archivers"
arch=('i686' 'x86_64')
url="http://xarchiver.sourceforge.net/"
@@ -24,12 +24,14 @@
xarchiver-0.5.3-fix-rpm-support.patch
xarchiver-0.5.3-fix-double-escaping.patch
xarchiver-0.5.3-fix-password-protected.patch
- xarchiver-0.5.3-add-mime-types.patch)
+ xarchiver-0.5.3-add-mime-types.patch
+ rar5-withespace.patch)
md5sums=('fd390bbd2df76a5f8a007bdeae82d4aa'
'812b93339f5e3332621f3c5abebfe277'
'6178d7ab679b761469c880a8db991907'
'35ab96d98521a0a36f3e9e9ec0969107'
- 'f9119f5290caa195a56b7d3c63d9137d')
+ 'f9119f5290caa195a56b7d3c63d9137d'
+ '77a4aead93f0b2c9cf44647101a85742')
prepare() {
cd $pkgname-$pkgver
@@ -45,6 +47,9 @@
# Add more MIME types in the desktop file
patch -Np1 -i ../xarchiver-0.5.3-add-mime-types.patch
+
+ # Fix RAR5 files containing white space
+ patch -Np1 -i ../rar5-withespace.patch
}
build() {
Added: rar5-withespace.patch
===================================================================
--- rar5-withespace.patch (rev 0)
+++ rar5-withespace.patch 2014-05-11 14:06:47 UTC (rev 110969)
@@ -0,0 +1,44 @@
+--- xarchiver-0.5.3.orig/src/rar.c
++++ xarchiver-0.5.3/src/rar.c
+@@ -345,7 +345,7 @@
+ unsigned short int i = 0;
+ unsigned int linesize,n,a;
+ gboolean dir = FALSE;
+- static gchar *filename;
++ static gchar *filename, *end;
+
+ if (last_line)
+ return;
+@@ -388,7 +388,6 @@
+ last_line = TRUE;
+ return;
+ }
+-
+ archive->nr_of_files++;
+
+ /* Permissions */
+@@ -453,15 +452,15 @@
+ for(; n < linesize && line[n] != ' '; n++);
+ line[n] = '\0';
+ item[i] = line + a;
+- i++;
+- n++;
+-
+- /* fileName */
+- for(n=64; n < linesize && line[n] == ' '; n++);
+- a = n;
+- for(; n < linesize && line[n] != ' ' && line[n] != '\n'; n++);
+- line[n]='\0';
+- filename = g_strdup(line + a);
++
++ /* FileName */
++ line[linesize - 1] = '\0';
++ filename = g_strdup(line+64);
++
++ /* Strip trailing whitespace */
++ end = filename + strlen(filename) - 1;
++ while(end >= filename && *end == ' ') end--;
++ *(end + 1) = '\0';
+
+ /* Work around for rar which doesn't
+ * output / with directories */
More information about the arch-commits
mailing list