According to the [API](http://www.w3.org/TR/file-system-api/#widl-Entry-moveTo-void-DirectoryEntry-parent-DOMString-newName-EntryCallback-successCallback-ErrorCallback-errorCallback) the `newName` parameter is optional, so you should check if it's not empty before setting it to the new entry.