diff --git a/src/io/file.rs b/src/io/file.rs
index 63b435434bc0b31fb4fe1b97f0fcfac2d4edaaa9..fb706499a47a295d40992d787319d0136153b930 100644
--- a/src/io/file.rs
+++ b/src/io/file.rs
@@ -37,10 +37,10 @@ impl Editor {
     }
 
     /// Write the file.
-    pub fn write<'a> (&'a mut self, mut path: &'a str) -> FileStatus {
+    pub fn write<'a> (&'a mut self, path: &'a str) -> FileStatus {
         self.buffers.current_buffer_info_mut().title = Some(path.into());
         if path == "" {
-            path = self.files[0].as_str();
+            return FileStatus::Other;
         }
         if let Some(mut file) = File::create(path).ok() {
             if file.write(self.buffers.current_buffer().to_string().as_bytes())