Skip to content

Commit

Permalink
Fix CQM Major defects in OneExplorer (Samsung#1608)
Browse files Browse the repository at this point in the history
This commit fixes 2 major defects in OneExplorer by making return type consistent.

ONE-vscode-DCO-1.0-Signed-off-by: Dayoung Lee <dayoung.lee@samsung.com>
  • Loading branch information
dayo09 authored Jul 17, 2023
1 parent fa76d03 commit 8e9ad51
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/OneExplorer/OneExplorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -884,14 +884,14 @@ export class OneTreeDataProvider implements vscode.TreeDataProvider<Node> {
return;
}

return this.askNewName(node).then((newname) => {
await this.askNewName(node).then(async (newname) => {
if (newname) {
const dirpath = path.dirname(node.uri.fsPath);
const newpath = `${dirpath}/${newname}`;

const edit = new vscode.WorkspaceEdit();
edit.renameFile(node.uri, vscode.Uri.file(newpath));
vscode.workspace.applyEdit(edit);
await vscode.workspace.applyEdit(edit);
}
});
}
Expand Down Expand Up @@ -983,7 +983,7 @@ export class OneTreeDataProvider implements vscode.TreeDataProvider<Node> {

await vscode.window
.showInformationMessage(title, { detail: detail, modal: true }, approval)
.then((ans) => {
.then(async (ans) => {
if (ans !== approval) {
return;
}
Expand All @@ -996,7 +996,7 @@ export class OneTreeDataProvider implements vscode.TreeDataProvider<Node> {
ignoreIfNotExists: true,
});

return vscode.workspace.applyEdit(edit);
await vscode.workspace.applyEdit(edit);
});
}

Expand Down

0 comments on commit 8e9ad51

Please sign in to comment.