Check-in [7c53fff896]
Overview
Comment:Updated to rethrow error from local-ify file
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tcl-ops
Files: files | file ages | folders
SHA1:7c53fff896933b13fc35b93f2e128c28c3e2b062
User & Date: rkeene on 2014-11-09 02:14:56
Other Links: manifest | tags
Context
2014-11-09
07:52
Began adding support for other types of files as well as added creat() and mknod() support check-in: 80bcdf4cb8 user: rkeene tags: tcl-ops
02:14
Updated to rethrow error from local-ify file check-in: 7c53fff896 user: rkeene tags: tcl-ops
02:13
Updated to create directory to store local file check-in: f2d710b7dc user: rkeene tags: tcl-ops
Changes

Modified appfsd.tcl from [7f053ee293] to [ce277262eb].

   605    605   		}
   606    606   
   607    607   		set localcachefile [download $pathinfo(hostname) $pkgpathinfo(file_sha1)]
   608    608   
   609    609   		if {$mode == "write"} {
   610    610   			set tmplocalpath "${localpath}.[expr rand()][clock clicks]"
   611    611   
   612         -			catch {
          612  +			set failed 0
          613  +			if {[catch {
   613    614   				file mkdir [file dirname $localpath]
   614    615   				file copy -force -- $localcachefile $tmplocalpath
   615    616   
   616    617   				if {$pkgpathinfo(perms) == "x"} {
   617    618   					file attributes $tmplocalpath -permissions +x
   618    619   				}
   619    620   
   620    621   				file rename -force -- $tmplocalpath $localpath
          622  +			} err]} {
          623  +				set failed 1
   621    624   			}
   622    625   			catch {
   623    626   				file delete -force -- $tmplocalpath
   624    627   			}
          628  +
          629  +			if {$failed} {
          630  +				return -code error $err
          631  +			}
   625    632   
   626    633   			return $localpath
   627    634   		}
   628    635   
   629    636   		return $localcachefile
   630    637   	}
   631    638   }