             @dtpServer.close()
           @reply 550, "#{reqPath}: No such file or directory"
         else
-          @dtpServer.dtpSocket.sender stdout.replace(/^total [0-9]+$/im, "").trim()
+          ls = BabyFtpd.changeCarriageCode stdout.replace(/^total [0-9]+$/im, "").trim()+"\n"
+          @dtpServer.dtpSocket.sender ls
     
     "RETR": (reqPath)->
       @fileSystem.getFile @sessionDir, reqPath, (err, data)=>

            @dtpServer.close()
          @reply 550, "#{reqPath}: No such file or directory"
        else
          @dtpServer.dtpSocket.sender files.join("\r\n") + "\r\n"
    
    "LIST": (reqPath = "")->
      @fileSystem.getList @sessionDir, reqPath, (err, stdout, stderr)=>

      socket.reply 220
    
    @piServer.listen port, host

  @changeCarriageCode: (data)->
    retData = data.replace /[\n\r]/g, "\n"
    retData = retData.replace /[\n]/g, "\r\n"
    return retData

  # Standard messages for status. (RFC 959)
  messages =
