Diff

Differences From Artifact [d0837729e0]:

To Artifact [251a7402cc]:


   403    403   								return [array get retval]
   404    404   							}
   405    405   
   406    406   							if {$pathlen > 4} {
   407    407   								set retval(_type) files
   408    408   								set retval(file) [join [lrange $path 4 end] "/"]
   409    409   							} else {
          410  +								set retval(_type) files
   410    411   								set retval(file) ""
   411    412   							}
   412    413   						}
   413    414   					}
   414    415   				}
   415    416   			}
   416    417   		}
................................................................................
   692    693   		}
   693    694   
   694    695   		set localpath [_localpath $pathinfo(package) $pathinfo(hostname) $pathinfo(file)]
   695    696   
   696    697   		return $localpath
   697    698   	}
   698    699   
   699         -	proc _delete_files_except_whiteout {path} {
   700         -		foreach file [glob -nocomplain -directory $path {{.,}*}] {
   701         -			if {[string match "*/.." $file] || [string match "*/." $file]} {
   702         -				continue
   703         -			}
   704         -
   705         -			if {[file isdirectory $file]} {
   706         -				_delete_files_except_whiteout $file
   707         -			}
   708         -
   709         -			if {[string match "*.APPFS.WHITEOUT" $file]} {
   710         -				continue
   711         -			}
   712         -
   713         -			catch {
   714         -				file delete -- $file
   715         -			}
   716         -		}
   717         -	}
   718         -
   719    700   	proc unlinkpath {path} {
   720    701   		array set pathattrs [exists $path]
   721    702   
   722    703   		if {![info exists pathattrs(packaged)]} {
   723    704   			return -code error "invalid type"
   724    705   		}
   725    706   
................................................................................
   727    708   
   728    709   		set whiteout 0
   729    710   		set isdirectory 0
   730    711   		if {[info exists pathattrs(is_localfile)]} {
   731    712   			if {[file isdirectory $localpath]} {
   732    713   				set isdirectory 1
   733    714   				set whiteout 1
   734         -				_delete_files_except_whiteout $localpath
   735    715   			} else {
   736    716   				file delete -force -- $localpath
   737    717   			}
   738    718   		} elseif {[info exists pathattrs(is_remotefile)]} {
   739    719   			if {$pathattrs(type) == "directory"} {
   740    720   				set isdirectory 1
   741    721   			}