Don't add a trailing slash when adding file to projects root dir

This commit is contained in:
Corey Johnson
2012-05-01 17:25:48 -07:00
parent 17fb34ec96
commit 15d69fbc41
2 changed files with 11 additions and 1 deletions

View File

@@ -21,7 +21,8 @@ class AddDialog extends View
@miniEditor.on 'focusout', => @remove()
directoryPath = if fs.isFile(@path) then fs.directory(@path) else @path
relativePath = @rootView.project.relativize(directoryPath) + '/'
relativePath = @rootView.project.relativize(directoryPath)
relativePath += '/' if relativePath.length > 0
@miniEditor.setText(relativePath)
confirm: ->