Skip to content

Commit

Permalink
Fix removing (temp) IFS directories
Browse files Browse the repository at this point in the history
  • Loading branch information
chrjorgensen committed Feb 14, 2024
1 parent cd8ab5e commit c9309b2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/api/IBMi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
4 changes: 2 additions & 2 deletions src/api/IBMiContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down Expand Up @@ -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()
]);
}
Expand Down
2 changes: 1 addition & 1 deletion src/api/local/deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(' ')}` });
}
}

Expand Down

0 comments on commit c9309b2

Please sign in to comment.