606
607
608
609
610
611
612
613
614
615
616
617
618
619
|
set localcachefile [download $pathinfo(hostname) $pkgpathinfo(file_sha1)]
if {$mode == "write"} {
set tmplocalpath "${localpath}.[expr rand()][clock clicks]"
catch {
file copy -force -- $localcachefile $tmplocalpath
if {$pkgpathinfo(perms) == "x"} {
file attributes $tmplocalpath -permissions +x
}
file rename -force -- $tmplocalpath $localpath
|
>
|
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
|
set localcachefile [download $pathinfo(hostname) $pkgpathinfo(file_sha1)]
if {$mode == "write"} {
set tmplocalpath "${localpath}.[expr rand()][clock clicks]"
catch {
file mkdir [file dirname $localpath]
file copy -force -- $localcachefile $tmplocalpath
if {$pkgpathinfo(perms) == "x"} {
file attributes $tmplocalpath -permissions +x
}
file rename -force -- $tmplocalpath $localpath
|