| Index: ui/file_manager/file_manager/foreground/js/naming_controller.js
|
| diff --git a/ui/file_manager/file_manager/foreground/js/naming_controller.js b/ui/file_manager/file_manager/foreground/js/naming_controller.js
|
| index 50a6ff3c70724a431ee78f538ac578d33bbcac35..866cb8eca28d7e9d509e45f38c608fc2cc320794 100644
|
| --- a/ui/file_manager/file_manager/foreground/js/naming_controller.js
|
| +++ b/ui/file_manager/file_manager/foreground/js/naming_controller.js
|
| @@ -94,7 +94,8 @@ NamingController.prototype.validateFileName = function(
|
| * @return {Promise.<string>}
|
| */
|
| NamingController.prototype.validateFileNameForSaving = function(filename) {
|
| - var directory = this.directoryModel_.getCurrentDirEntry();
|
| + var directory = /** @type {DirectoryEntry} */ (
|
| + this.directoryModel_.getCurrentDirEntry());
|
| var currentDirUrl = directory.toURL().replace(/\/?$/, '/');
|
| var fileUrl = currentDirUrl + encodeURIComponent(filename);
|
|
|
| @@ -339,7 +340,7 @@ NamingController.prototype.commitRename_ = function() {
|
| // parent if the directory content is a search result. Fix it to do proper
|
| // validation.
|
| this.validateFileName(
|
| - this.directoryModel_.getCurrentDirEntry(),
|
| + /** @type {DirectoryEntry} */ (this.directoryModel_.getCurrentDirEntry()),
|
| newName,
|
| validationDone.bind(this));
|
| };
|
|
|