     return path.replace /(\/+)$/, ""
 
   makeNewApp:(callback)->
-
-    return callback? yes if newAppModal
 
     newAppModal = new KDModalViewWithForms
       title                       : "Create a new Application"


    async.series stack, (err, result) =>
      warn err  if err
      callback? err, result

  @getAppInfoFromPath = (path)->

    return  unless path

    vm    = FSHelper.getVMNameFromPath path
    path  = FSHelper.plainPath path
    reg   = /// ^\/home\/#{KD.nick()}\/Applications\/(.*)\.kdapp\/ ///
    parts = reg.exec path
    return  unless parts

    {path:parts[0], name:parts[1], vm}

  @installKDC = ->


                        duration  : 3000
                    else
                      @prepareApplication name, (err, response)=>
                        callback? err, response
                        form.buttons.Create.hideLoader()
                        newAppModal.destroy()

