Diff

Differences From Artifact [985d2df621]:

To Artifact [bd58d61afc]:


    40     40   
    41     41   	# User-replaceable function get the home directory of the current user
    42     42   	proc get_homedir {} {
    43     43   		return [::appfsd::get_homedir]
    44     44   	}
    45     45   
    46     46   	# User-replacable function to update permissions
    47         -	proc change_perms {file sha1 perms} {
           47  +	proc change_perms {file hash perms {hashMethod "sha1"}} {
    48     48   		if {[info exists ::appfs::user::add_perms($file)]} {
    49     49   			append perms $::appfs::user::add_perms($file)
    50     50   		}
    51     51   
    52         -		if {[info exists ::appfs::user::add_perms($sha1)]} {
    53         -			append perms $::appfs::user::add_perms($sha1)
           52  +		if {[info exists ::appfs::user::add_perms([list $hashMethod $hash])]} {
           53  +			append perms $::appfs::user::add_perms([list $hashMethod $hash])
           54  +		} elseif {$hashMethod eq "sha1" && [info exists ::appfs::user::add_perms($hash)]} {
           55  +			append perms $::appfs::user::add_perms($hash)
    54     56   		}
    55     57   
    56     58   		return $perms
    57     59   	}
    58     60   
    59     61   	# User-replacable function to fetch a remote file
    60     62   	proc download_file {url {outputChannel ""}} {