       fileInfo = data.getLocalFileInfo()
       if fileInfo.lastUploadedChunk
         {lastUploadedChunk, totalChunks} = fileInfo
-        if lastUploadedChunk is totalChunks
-          data.removeLocalFileInfo()
-          @updateProgressView 100
-        else
-          @updateProgressView 100 * lastUploadedChunk / totalChunks
+        data.removeLocalFileInfo() if lastUploadedChunk is totalChunks
+        @showProgressView 100 * lastUploadedChunk / totalChunks
 
   mouseDown:-> yes
 

      @childView.setDomAttributes
        title : FSHelper.plainPath data.name

    @progress = new KDProgressBarView

    @on "ItemBeingDeleted", =>
      data.removeLocalFileInfo()


      @resetView()
    @renameView.input.setFocus()

  showProgressView: (percent=0, determinate=yes)->

    unless @progressView
      @addSubView @progressView = new KDProgressBarView

    @progressView.setOption "determinate", determinate
    @progressView.updateBar percent, "%", ""
    if 0 <= percent < 100
    then @setClass "progress"
    else @utils.wait 1000, =>
      @resetView()

  pistachio:->

    """
    {{> @childView}}
    """
