Check-in [de2b9ae717]
Overview
Comment:Added extra sanity checks to home directory searching.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:de2b9ae7170da19339f52287ad2af8639855f8d9
User & Date: rkeene on 2009-04-18 22:30:10
Other Links: manifest | tags
Context
2009-04-19
08:19
Added support for using "vfs::zip" if it is available. check-in: 738556ed56 user: rkeene tags: trunk
2009-04-18
22:30
Added extra sanity checks to home directory searching. check-in: de2b9ae717 user: rkeene tags: trunk
22:28
Made unzipping its own procedure, in the hopes of replacing it with a portable unzipping routine in the future. check-in: 037c0fa432 user: rkeene tags: trunk
Changes

Modified client/lib/teapotclient0.1/teapotclient.tcl from [0dfe97b138] to [e17f36fccf].

    11     11   namespace eval ::teapotclient {
    12     12   	proc __get_tmpdir {} {
    13     13   		foreach checkenv [list TMPDIR TEMP TMP TEMPDIR] {
    14     14   			if {[info exists ::env($checkenv)]} {
    15     15   				return $::env($checkenv)
    16     16   			}
    17     17   		}
           18  +
    18     19   		return "/tmp"
    19     20   	}
    20     21   
    21     22   	proc __get_homedir {} {
    22     23   		if {[info exists ::env(HOME)]} {
    23         -			return $::env(HOME)
           24  +			if {[file exists $::env(HOME)]} {
           25  +				return $::env(HOME)
           26  +			}
    24     27   		}
    25     28   
    26     29   		catch {
    27     30   			set ::env(HOME) [file normalize ~]
    28     31   		}
    29     32   		if {[info exists ::env(HOME)]} {
    30         -			return $::env(HOME)
           33  +			if {[file exists $::env(HOME)]} {
           34  +				return $::env(HOME)
           35  +			}
    31     36   		}
    32     37   
    33     38   		set ::env(HOME) [file join [__get_tmpdir] FAKEHOME_$tcl_platform(user)]
    34     39   		catch {
    35     40   			file mkdir $::env(HOME)
    36     41   		}
    37     42