From 7a0d8be405f8d949cba1eedb27af90bbc452d481 Mon Sep 17 00:00:00 2001 From: Kamal Marhubi Date: Sun, 31 Jan 2016 02:01:54 -0500 Subject: [PATCH] bin: Canonicalize path before looking for project file --- src/bin/rustfmt.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/bin/rustfmt.rs b/src/bin/rustfmt.rs index a8a19d96bc7..187b48ec196 100644 --- a/src/bin/rustfmt.rs +++ b/src/bin/rustfmt.rs @@ -51,9 +51,7 @@ fn lookup_project_file(input_file: &Path) -> io::Result { input_file.to_path_buf() }; - // FIXME: We should canonize path to properly handle its parents, - // but `canonicalize` function is unstable now (recently added API) - // current = try!(fs::canonicalize(current)); + current = try!(fs::canonicalize(current)); loop { let config_file = current.join("rustfmt.toml");