1
0
Fork 0
This repository has been archived on 2019-12-23. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
arduinisten/arduino-0018-windows/hardware/tools/avr/share/redhat/gui/path.tcl

21 lines
596 B
Tcl
Raw Normal View History

2010-03-30 21:53:44 +02:00
# path.tcl - Path-handling helpers.
# Copyright (C) 1998 Cygnus Solutions.
# Written by Tom Tromey <tromey@cygnus.com>.
# This proc takes a possibly relative path and expands it to the
# corresponding fully qualified path. Additionally, on Windows the
# result is guaranteed to be in "long" form.
proc canonical_path {path} {
global tcl_platform
set r [file join [pwd] $path]
if {$tcl_platform(platform) == "windows"} then {
# This will fail if the file does not already exist.
if {! [catch {file attributes $r -longname} long]} then {
set r $long
}
}
return $r
}