Re: patchfs, audio update



Adam Byrtek 'alpha' wrote:
On Fri, Dec 13, 2002 at 07:09:27PM +0200, Andrew V. Samoilov wrote:

Perfect and very impressive!  Power perl skills!


Thank you very much :)


I do not enforce you to implement context format.
But it will be some regressive and on other hand some projects (Samba as
far as I remember) require context patches.

Also patch produces .rej files in context format.

Just wanted to inform you I will not work on this issue, so if you
want to - go on.

Well, but some quoting (and security) issues fixed in the CVS just now.
Patch attached.
BTW, new incarnation reports wrong patch sizes for gzipped patches.
You can see this bug with gzipped attachment from http://mail.gnome.org/archives/mc-devel/2001-July/msg00003.html.


--
Regards,
Andrew V. Samoilov
Index: mc/vfs/ChangeLog
diff -u mc/vfs/ChangeLog:1.564 mc/vfs/ChangeLog:1.565
--- mc/vfs/ChangeLog:1.564	Mon Dec 16 19:32:38 2002
+++ mc/vfs/ChangeLog	Wed Dec 18 09:31:54 2002
@@ -1,3 +1,9 @@
+2002-12-18  Andrew V. Samoilov  <sav bcs zp ua>
+
+	* extfs/patchfs.in (openread): Use quoted $archive when opening
+	archives.
+	(list): Set $archive to quoted $_[0].
+
 2002-12-16  Pavel Roskin  <proski gnu org>
 
 	* extfs/rpm: Don't check package signatures - it creates a lot
Index: mc/vfs/extfs/patchfs.in
diff -u mc/vfs/extfs/patchfs.in:1.7 mc/vfs/extfs/patchfs.in:1.8
--- mc/vfs/extfs/patchfs.in:1.7	Fri Dec 13 00:22:09 2002
+++ mc/vfs/extfs/patchfs.in	Wed Dec 18 09:31:55 2002
@@ -46,7 +46,7 @@
 # list files affected by patch
 sub list
 {
-    my ($archive)= _;
+    my ($archive)=(quotemeta $_[0]);
     my ($state,$pos,$npos,$time);
     my ($f,$fsrc,$fdst,$prefix);
 
@@ -55,7 +55,7 @@
 
     import Date::Parse if ($parsedates);
     
-    # state==1 means diff contents, state==0 mens comments
+    # state==1 means diff contents, state==0 means comments
     $state=1; $f="";
     while (<I>) {
 	if (/^-{3} /) {
@@ -193,9 +193,9 @@
 
     $_=`$file $archive`;
     if (/bzip/) {
-	open I, "$bzip -dc $ARGV[1] |";
+	open I, "$bzip -dc $archive |";
     } elsif (/gzip/) {
-	open I, "$gzip -dc $ARGV[1] |";
+	open I, "$gzip -dc $archive |";
     } else {
 	open I, "< $ARGV[1]";
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]