diff options
author | Ben S <ogham@bsago.me> | 2015-03-01 13:49:51 +0000 |
---|---|---|
committer | Ben S <ogham@bsago.me> | 2015-03-01 13:50:15 +0000 |
commit | 027ca60d90b1cc333de52811436e631c4de5af69 (patch) | |
tree | 533c243a3bf5e93c3b193676ceb5ecfa46510085 /src/file.rs | |
parent | f6276dfb9deba3b2e1b51a501b21c0c144906029 (diff) |
current_dir -> getcwd
current_dir returns a new PathBuf, but getcwd returns an old Path. One day I'll have to upgrade to the new Path library. One day.
Fixes #41.
Diffstat (limited to 'src/file.rs')
-rw-r--r-- | src/file.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/file.rs b/src/file.rs index efc4797..a8a72f6 100644 --- a/src/file.rs +++ b/src/file.rs @@ -1,7 +1,7 @@ use std::old_io::{fs, IoResult}; use std::old_io as io; use std::ascii::AsciiExt; -use std::env::current_dir; +use std::os::getcwd; use ansi_term::{ANSIString, ANSIStrings, Colour, Style}; use ansi_term::Style::Plain; @@ -451,7 +451,7 @@ impl<'a> File<'a> { fn git_status(&self) -> Cell { let status = match self.dir { - Some(d) => d.git_status(¤t_dir().unwrap_or(Path::new(".")).join(&self.path), + Some(d) => d.git_status(&getcwd().unwrap_or(Path::new(".")).join(&self.path), self.is_directory()), None => GREY.paint("--").to_string(), }; |