Changeset 140682 for trunk/base


Ignore:
Timestamp:
Sep 30, 2015, 6:02:47 AM (5 years ago)
Author:
jmr@…
Message:

avoid error due to calling realpath on nonexistent files

File:
1 edited

Legend:

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

    r140676 r140682  
    7272        # being resolved to /private/tmp.
    7373        # Use realpath to avoid this behavior.
    74         set normalizedPath [realpath $path]
     74        set normalizedPath [file normalize $path]
     75        # realpath only works on files that exist
     76        if {![catch {file type $normalizedPath}]} {
     77            set normalizedPath [realpath $normalizedPath]
     78        }
    7579        lappend sndbxlst "[string map $mapping $path]=$action"
    7680        if {$normalizedPath ne $path} {
Note: See TracChangeset for help on using the changeset viewer.