Skip to content

Commit cd4c3b7

Browse files
authored
Clear marketplace cache during upgrade (#1628)
Signed-off-by: Jan N. Klug <[email protected]>
1 parent 3c484da commit cd4c3b7

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

distributions/openhab/src/main/resources/bin/update

+1
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ done < "$TempDir/filelist.lst"
321321
echo "Clearing cache..."
322322
rm -rf "${OPENHAB_USERDATA:?}/cache"
323323
rm -rf "${OPENHAB_USERDATA:?}/tmp"
324+
rm -rf "${OPENHAB_USERDATA:?}/marketplace"
324325

325326
## Unzip the downloaded folder into openHAB's directory WITHOUT replacing any existing files.
326327
echo "Updating openHAB..."

distributions/openhab/src/main/resources/bin/update.ps1

+7
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,13 @@ Function Update-openHAB() {
743743
return PrintAndThrow "Could not delete the $OHUserData\tmp directory" $_
744744
}
745745

746+
try {
747+
Write-Host -ForegroundColor Cyan "Removing $OHUserData\marketplace"
748+
DeleteIfExists "$OHUserData\marketplace" $True
749+
} catch {
750+
return PrintAndThrow "Could not delete the $OHUserData\marketplace directory" $_
751+
}
752+
746753
############## STEP 4 - copy files from temporary to distribution WITHOUT replacement
747754
Write-Host -ForegroundColor Cyan "Copying $TempDistribution to $OHDirectory without overwriting existing ones"
748755
try {

0 commit comments

Comments
 (0)