Diff

Differences From Artifact [0dfe97b138]:

To Artifact [e17f36fccf]:


11
12
13
14
15
16
17

18
19
20
21
22

23

24
25
26
27
28
29

30

31
32
33
34
35
36
37
namespace eval ::teapotclient {
	proc __get_tmpdir {} {
		foreach checkenv [list TMPDIR TEMP TMP TEMPDIR] {
			if {[info exists ::env($checkenv)]} {
				return $::env($checkenv)
			}
		}

		return "/tmp"
	}

	proc __get_homedir {} {
		if {[info exists ::env(HOME)]} {

			return $::env(HOME)

		}

		catch {
			set ::env(HOME) [file normalize ~]
		}
		if {[info exists ::env(HOME)]} {

			return $::env(HOME)

		}

		set ::env(HOME) [file join [__get_tmpdir] FAKEHOME_$tcl_platform(user)]
		catch {
			file mkdir $::env(HOME)
		}








>





>
|
>






>
|
>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
namespace eval ::teapotclient {
	proc __get_tmpdir {} {
		foreach checkenv [list TMPDIR TEMP TMP TEMPDIR] {
			if {[info exists ::env($checkenv)]} {
				return $::env($checkenv)
			}
		}

		return "/tmp"
	}

	proc __get_homedir {} {
		if {[info exists ::env(HOME)]} {
			if {[file exists $::env(HOME)]} {
				return $::env(HOME)
			}
		}

		catch {
			set ::env(HOME) [file normalize ~]
		}
		if {[info exists ::env(HOME)]} {
			if {[file exists $::env(HOME)]} {
				return $::env(HOME)
			}
		}

		set ::env(HOME) [file join [__get_tmpdir] FAKEHOME_$tcl_platform(user)]
		catch {
			file mkdir $::env(HOME)
		}