diff --git a/src/packages/tree-view/src/tree-view.coffee b/src/packages/tree-view/src/tree-view.coffee index 1efaaa24e..77d36ab01 100644 --- a/src/packages/tree-view/src/tree-view.coffee +++ b/src/packages/tree-view/src/tree-view.coffee @@ -208,9 +208,13 @@ class TreeView extends ScrollView entry = @selectedEntry() return unless entry oldPath = entry.getPath() + if fs.isFile(oldPath) + prompt = "Enter the new path for the file." + else + prompt = "Enter the new path for the directory." dialog = new Dialog - prompt: "Enter the new path for the file." + prompt: prompt path: @rootView.project.relativize(oldPath) select: true iconClass: 'move'