From: Vince Darley Date: Thu, 30 Oct 2003 13:16:18 +0000 (+0000) Subject: tarvfs relative paths X-Git-Tag: vfs-1-4~109 X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=9739dce98f83db82fb6efdfd699e9237a74d340e;p=tclvfs tarvfs relative paths --- diff --git a/ChangeLog b/ChangeLog index 459ed33..4beed45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-10-30 Vince Darley + + * library/tarvfs.tcl: fix to problem with relative paths + (Thanks Stefan). + 2003-10-21 Jean-Claude Wippler * starkit.tcl: add starkit::mode variable, which remembers the diff --git a/library/tarvfs.tcl b/library/tarvfs.tcl index 2132ce8..f14cb32 100644 --- a/library/tarvfs.tcl +++ b/library/tarvfs.tcl @@ -310,6 +310,10 @@ proc tar::TOC {fd arr toc} { set incr [expr int(ceil($size/double($BLOCK_SIZE)))*$BLOCK_SIZE+$BLOCK_SIZE] set startPosition [expr $pos+$BLOCK_SIZE] + # make it relative to this working-directory, remove the + # leading "relative"-paths + regexp -- {^(?:\.\.?/)*/?(.*)} $name -> name + if {$name != ""} { incr sb(nitems) set sb($name,start) [expr $pos+$BLOCK_SIZE]