       panel.destroy()
 
   sendSave: (project, file, buffer) ->
-    ipc.send 'fs-local-save', JSON.stringify({
-      action: 'local_save',
-      project: {
-        path: this.formatFilePath(project.getPaths()[0])
-      },
-      file: {
-        path: this.formatFilePath(file.path)
-        digest: file.digest,
-      },
-      buffer: {
-        content: window.btoa(unescape(encodeURIComponent(buffer.getText())))
-      }
-    })
+    @convertLineEndingsToUnixFormat(buffer).then =>
+      ipc.send 'fs-local-save', JSON.stringify({
+        action: 'local_save',
+        project: {
+          path: this.formatFilePath(project.getPaths()[0])
+        },
+        file: {
+          path: this.formatFilePath(file.path)
+          digest: file.digest,
+        },
+        buffer: {
+          content: window.btoa(unescape(encodeURIComponent(buffer.getText())))
+        }
+      })
 
   #formattedText: (text) ->
     #try

      return path.replace(/(.*:\\)/, '/').replace(/\\/g, '/')
    else
      return path


      editor.onDidSave =>
        console.log 'Saving: Path - ' + this.formatFilePath(buffer.file.path) + ' Matches? - ' + !!this.formatFilePath(buffer.file.path).match(/\.atom\/code/)
        if @formatFilePath(buffer.file.path).match(/\.atom\/code/)
          if @connectionState == 'closed'
            @popupNoConnectionWarning()

          @sendSave(editor.project, buffer.file, buffer)

      editor.onDidChangePath =>
        console.log('PATH CHANGED')

