Opt-in to auto-delete old releases
This commit is contained in:
@@ -5,7 +5,7 @@ const os = require('os');
|
||||
const path = require('path');
|
||||
const unzip = require('unzipper');
|
||||
|
||||
const addListeners = (ipcMain, standardIPCReply) => {
|
||||
const addListeners = (ipcMain, getCleanupReleases, standardIPCReply) => {
|
||||
ipcMain.on(Constants.IPC_Check_Installed, (event, data) => {
|
||||
const destination = path.join(helpers.getDataDirectory(), data.Version);
|
||||
helpers
|
||||
@@ -30,7 +30,9 @@ const addListeners = (ipcMain, standardIPCReply) => {
|
||||
});
|
||||
|
||||
ipcMain.on(Constants.IPC_Cleanup_Releases + '_sync', (event, data) => {
|
||||
helpers.cleanupOldReleases(data.version_list);
|
||||
if (getCleanupReleases()) {
|
||||
helpers.cleanupOldReleases(data.version_list);
|
||||
}
|
||||
|
||||
event.returnValue = true;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user