Re: librep tar file handler patch



Thanks - commited,
Chris

Am Montag, den 16.02.2009, 23:48 -0800 schrieb Mark Diekhans:
> Hi Folks,
> 
> Librep doesn't correct parse the output of bsdtar in the tar
> file handle.  Its a bit of work to fix the code to handle it and
> easy to installed gnu tar.  However librep doesn't provide any
> kind of error detection for this, making it a lot of work to
> figure out what is going on.  Enclosed is a patch to a least
> report the failure to parse tar's output.
> 
> Thanks
> Mark
> 
> einfaches Textdokument-Anlage (tar.jl.patch)
> --- lisp/rep/io/file-handlers/tar.jl.ORG	2009-02-12 23:26:14.000000000 -0800
> +++ lisp/rep/io/file-handlers/tar.jl	2009-02-16 23:09:46.000000000 -0800
> @@ -204,7 +204,7 @@
>        (setq tarfh-pending-output (substring string point)))))
>  
>  (defun tarfh-parse-list (string point)
> -  (when (string-looking-at tarfh-list-regexp string point)
> +  (if (string-looking-at tarfh-list-regexp string point)
>      (let
>  	((mode-string (substring string (match-start 1) (match-end 1)))
>  	 (user (substring string (match-start 2) (match-end 2)))
> @@ -220,7 +220,9 @@
>        (setq file-name (expand-file-name name ""))
>        (vector name file-name size modtime
>  	      (cdr (assq (aref mode-string 0) tarfh-list-type-alist))
> -	      nil mode-string user group symlink))))
> +	      nil mode-string user group symlink))
> +    (error "can't parse tar file listing line (GNU or Solaris tar required): %s" (substring string point))))
> +    
>  
>  (defun tarfh-file-get-modtime (file-struct)
>    (when (stringp (aref file-struct tarfh-file-modtime))



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