Fix #339 - fs.rename tests fail on the browser

This commit is contained in:
Gideon Thomas 2014-12-17 15:08:13 -05:00
parent 841360de71
commit 67dba10d49
1 changed files with 3 additions and 0 deletions

View File

@ -2003,6 +2003,9 @@ function rename(fs, context, oldpath, newpath, callback) {
if(error) {
callback(error);
} else {
if(oldParentDirectory.id === newParentDirectory.id) {
oldParentData = newParentData;
}
delete oldParentData[oldName];
context.putObject(oldParentDirectory.data, oldParentData, read_new_directory);
}