tarvfs relative paths
authorVince Darley <vincentdarley@sourceforge.net>
Thu, 30 Oct 2003 13:16:18 +0000 (13:16 +0000)
committerVince Darley <vincentdarley@sourceforge.net>
Thu, 30 Oct 2003 13:16:18 +0000 (13:16 +0000)
ChangeLog
library/tarvfs.tcl

index 459ed33ff723d392973c3d410bc648ae6a5543ed..4beed458449e0b07dbf7f324c74723c197d794e0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-10-30  Vince Darley <vincentdarley@sourceforge.net>
+
+       * library/tarvfs.tcl: fix to problem with relative paths
+       (Thanks Stefan).
+
 2003-10-21  Jean-Claude Wippler  <jcw@equi4.com>
 
        * starkit.tcl: add starkit::mode variable, which remembers the
index 2132ce872414a0457dc2418018a2a7d158f9b589..f14cb32a3404a3e7cee7326325acac669a3372bd 100644 (file)
@@ -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]