Tcl Library Source Code

View Ticket
Login
Ticket UUID: 47ef6dc0c55d4a2bd7720a8cb6d502a7c9a28e0a
Title: add throws can't read "tar": no such variable
Type: Bug Version: 0.13
Submitter: anonymous Created on: 2024-12-18 15:50:29
Subsystem: tar Assigned To:
Priority: 7 High Severity: Severe
Status: Open Last Modified: 2025-05-07 13:28:57
Resolution: None Closed By: nobody
    Closed on:
Description:
There is an error in proc ::tar::SetupWriting. The used local var $tar is not available.
User Comments: anonymous added on 2025-05-07 13:28:57:

using ::tar::add - methode will cause a script error, because in this method

proc ::tar::SetupWriting {file do {mode rb+}} {
    set fh [::open $tar $mode]
    if {[IsGzFile $fh]} {
	close $fh
	Err "cannot $do gzip compressed tar" ZLIB UNSUPPORTED WRITE
    }
    return $fh
}

the variable $tar in open command does not exist, needs to be changed to $file