Changeset 13467


Ignore:
Timestamp:
Aug 11, 2005, 9:29:32 AM (15 years ago)
Author:
pguyot (Paul Guyot)
Message:

Also filter files under $TMPDIR if this variable is set.

Bug: #4381
Submitted by:
Reviewed by:
Approved by:
Obtained from:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/porttrace.tcl

    r13407 r13467  
    22# porttrace.tcl
    33#
    4 # $Id: porttrace.tcl,v 1.11 2005/08/08 02:20:12 pguyot Exp $
     4# $Id: porttrace.tcl,v 1.12 2005/08/11 09:29:32 pguyot Exp $
    55#
    66# Copyright (c) 2005 Paul Guyot <pguyot@kallisys.net>,
     
    166166proc slave_read_line {chan} {
    167167        global ports_list trace_filemap created_list workpath trace_mutex own_mutex
     168        global env
    168169
    169170        # Acquire the mutex.
     
    221222                        } elseif {$op == "create"} {
    222223                                # Only keep entries not under workpath, under /tmp/, under
    223                                 # /var/tmp/ and /dev/null
     224                                # /var/tmp/, $TMPDIR and /dev/null
    224225                                if {![string equal -length [string length "/tmp/"] "/tmp/" $path]
    225226                                        && ![string equal -length [string length "/var/tmp/"] "/var/tmp/" $path]
     227                                        && (![info exists env(TMPDIR)]
     228                                                || ![string equal -length [string length $env(TMPDIR)] $env(TMPDIR) $path])
    226229                                        && ![string equal "/dev/null" $path]
    227230                                        && ![string equal -length [string length $workpath] $workpath $path]} {
Note: See TracChangeset for help on using the changeset viewer.