Skip to content

Commit

Permalink
Merge pull request #12435 from mlschroe/master
Browse files Browse the repository at this point in the history
[backend] fix cache handling for preinstall images
  • Loading branch information
mlschroe committed Apr 12, 2022
2 parents eeb2dc4 + bdb1db4 commit f34159f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/backend/bs_worker
Original file line number Diff line number Diff line change
Expand Up @@ -2136,10 +2136,9 @@ sub getpreinstallimage {
unlink("$dir/$ifile");

# check if the image is in the cache
my $cacheid;
my $cachefile;
my ($cacheid, $cachefile);
if ($cachedir) {
my ($cacheid, $cachefile) = get_cachefile($bestimg->{'prpa'}, $bestimg->{'hdrmd5'});
($cacheid, $cachefile) = get_cachefile($bestimg->{'prpa'}, $bestimg->{'hdrmd5'});
my $cachefilemeta = readstr("$cachefile.meta", 1) || '';
if ($cachefilemeta eq "$bestimg->{'hdrmd5'} :preinstallimage\n") {
if (link_or_copy($cachefile, "$dir/$ifile")) {
Expand Down

0 comments on commit f34159f

Please sign in to comment.