From c9309b2be7b4c2d80ebf85af3b472812b7734e1b Mon Sep 17 00:00:00 2001 From: Christian Jorgensen Date: Wed, 14 Feb 2024 12:28:53 +0100 Subject: [PATCH] Fix removing (temp) IFS directories --- src/api/IBMi.ts | 2 +- src/api/IBMiContent.ts | 4 ++-- src/api/local/deployment.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/IBMi.ts b/src/api/IBMi.ts index c2ef24e1c..7ef974e07 100644 --- a/src/api/IBMi.ts +++ b/src/api/IBMi.ts @@ -429,7 +429,7 @@ export default class IBMi { }) this.sendCommand({ - command: `rm -f ${path.posix.join(this.config.tempDir, `vscodetemp*`)}` + command: `rm -rf ${path.posix.join(this.config.tempDir, `vscodetemp*`)}` }) .then(result => { // All good! diff --git a/src/api/IBMiContent.ts b/src/api/IBMiContent.ts index 9fd71604f..5888a6fe1 100644 --- a/src/api/IBMiContent.ts +++ b/src/api/IBMiContent.ts @@ -169,7 +169,7 @@ export default class IBMiContent { switch (messageID) { case "CPDA08A": //We need to try again after we delete the temp remote - const result = await this.ibmi.sendCommand({ command: `rm -f ${tempRmt}`, directory: `.` }); + const result = await this.ibmi.sendCommand({ command: `rm -rf ${tempRmt}`, directory: `.` }); retry = !result.code || result.code === 0; break; case "CPFA0A9": @@ -344,7 +344,7 @@ export default class IBMiContent { if (this.config.autoClearTempData) { Promise.allSettled([ - this.ibmi.sendCommand({ command: `rm -f ${tempRmt}`, directory: `.` }), + this.ibmi.sendCommand({ command: `rm -rf ${tempRmt}`, directory: `.` }), deleteTable ? this.ibmi.runCommand({ command: `DLTOBJ OBJ(${library}/${file}) OBJTYPE(*FILE)`, noLibList: true }) : Promise.resolve() ]); } diff --git a/src/api/local/deployment.ts b/src/api/local/deployment.ts index d7f9f2882..be07dd9e3 100644 --- a/src/api/local/deployment.ts +++ b/src/api/local/deployment.ts @@ -198,7 +198,7 @@ export namespace Deployment { export async function deleteFiles(parameters: DeploymentParameters, toDelete: string[]) { if (toDelete.length) { Deployment.deploymentLog.appendLine(`\nDeleted:\n\t${toDelete.join('\n\t')}\n`); - await Deployment.getConnection().sendCommand({ directory: parameters.remotePath, command: `rm -f ${toDelete.join(' ')}` }); + await Deployment.getConnection().sendCommand({ directory: parameters.remotePath, command: `rm -rf ${toDelete.join(' ')}` }); } }