Skip to content

Commit aed82ca

Browse files
authored
Merge pull request #41 from hbcarlos/rename
Emit fileChanged after rename
2 parents 1f5fbf3 + 4260f63 commit aed82ca

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/drive.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,16 @@ export class FileSystemDrive implements Contents.IDrive {
217217

218218
await this.delete(oldPath);
219219

220-
return this.get(newPath);
220+
const data = this.get(newPath);
221+
data.then(model => {
222+
this._fileChanged.emit({
223+
type: 'rename',
224+
oldValue: { path: oldPath },
225+
newValue: model
226+
});
227+
});
228+
229+
return data;
221230
}
222231

223232
async save(

0 commit comments

Comments
 (0)