Check-in [d0513156ec]
Overview
Comment:Updated to download files as binary
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d0513156ec22fec7b239942a28cc6abcb79048dc
User & Date: rkeene on 2014-09-09 06:46:34
Other Links: manifest | tags
Context
2014-09-09
06:46
Implemented basic open() and read() check-in: a7c7a7a363 user: rkeene tags: trunk
06:46
Updated to download files as binary check-in: d0513156ec user: rkeene tags: trunk
06:10
Added executable bit check-in: 99c9d35a89 user: rkeene tags: trunk
Changes

Modified appfs.tcl from [10ad08f811] to [8e33ab2552].

24
25
26
27
28
29
30

31
32
33
34
35
36
37
38
39

		file mkdir [file dirname $file]

		if {![file exists $file]} {
			set tmpfile "${file}.new"

			set fd [open $tmpfile "w"]


			set token [::http::geturl $url -channel $fd]
			set ncode [::http::ncode $token]
			::http::reset $token
			close $fd

			if {$ncode == "200"} {
				file rename -force -- $tmpfile $file
			} else {







>

|







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

		file mkdir [file dirname $file]

		if {![file exists $file]} {
			set tmpfile "${file}.new"

			set fd [open $tmpfile "w"]
			fconfigure $fd -translation binary

			set token [::http::geturl $url -channel $fd -binary true]
			set ncode [::http::ncode $token]
			::http::reset $token
			close $fd

			if {$ncode == "200"} {
				file rename -force -- $tmpfile $file
			} else {