Fixed bug in lock script

the unlock command was not checking the correct hash key to match
the user name
redis
Stephen Palmer 2012-11-15 17:35:47 +00:00 committed by Sitaram Chamarty
parent 96cc2eaf41
commit d2214b06b5
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ sub f_unlock {
my ( $repo, $file ) = @_;
my %locks = get_locks();
_die "'$file' not locked by '$ENV{GL_USER}'" if ( $locks{$file} || '' ) ne $ENV{GL_USER};
_die "'$file' not locked by '$ENV{GL_USER}'" if ( $locks{$file}{USER} || '' ) ne $ENV{GL_USER};
delete $locks{$file};
put_locks(%locks);
}