Skip to content

Commit

Permalink
Merge pull request #41 from hbcarlos/rename
Browse files Browse the repository at this point in the history
Emit fileChanged after rename
  • Loading branch information
martinRenou committed Aug 2, 2022
2 parents 1f5fbf3 + 4260f63 commit aed82ca
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/drive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,16 @@ export class FileSystemDrive implements Contents.IDrive {

await this.delete(oldPath);

return this.get(newPath);
const data = this.get(newPath);
data.then(model => {
this._fileChanged.emit({
type: 'rename',
oldValue: { path: oldPath },
newValue: model
});
});

return data;
}

async save(
Expand Down

0 comments on commit aed82ca

Please sign in to comment.