     @havingTrouble.hide()
 
   showMessage:(message, details = '')->
-    message = "<strong>An error occured!</strong> <span>Click</span> here for details." unless message
+    unless message
+      message = "<strong>An error occured!</strong> <span>Click</span> here for details."
     @savePasswordWarning.hide()
     @statusText1.updatePartial message
     @statusText1.show()


  click:(event)->
    {mounted, remoteuser, remotehost} = @getData()
    @getDelegate().emit "RefreshFolder", "#{remoteuser}@#{remotehost}", yes if mounted

class KDYesNoSwitch extends KDOnOffSwitch
  constructor:(options = {}, data)->

      method : 'readMountInfo'
    , KD.utils.getTimedOutCallback (err, mounts)=>
      @hideMessages()
      @customItem?.destroy()
      if not err and mounts?.length == 0
        @addCustomItem "There is no remote drive attached to your Virtual Environment."
      else
        @mountController.instantiateListItems mounts unless err
      @havingTrouble.show()
      error err if err
      callback?()
    , =>
      @addCustomItem "It seems there is something wrong with remote servers. Please try again later."
      callback?()
    , 8000

  mountRemote:(mount, callback)=>
    {remotehost, haspass, remotepass, remoteuser} = mount
