Skip to content

Commit fe0643b

Browse files
committed
---
yaml --- r: 42641 b: refs/heads/try c: 5ff6bee h: refs/heads/master i: 42639: c1f82f5 v: v3
1 parent 25b9a0a commit fe0643b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 19dfec2aaf746535de1521f68421f9980dbf25de
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
5-
refs/heads/try: 72c04a9ffe0f8d164599e2f24f02277f1499f089
5+
refs/heads/try: 5ff6beed60fe3a1b783968deda9b5ca99afbeba6
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

branches/try/src/librustc/metadata/filesearch.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,12 @@ fn get_cargo_root_nearest() -> Result<Path, ~str> {
148148
do result::chain(get_cargo_root()) |p| {
149149
let cwd = os::getcwd();
150150
let cwd_cargo = cwd.push(".cargo");
151+
let cargo_is_non_root_file =
152+
!os::path_is_dir(&cwd_cargo) && cwd_cargo != p;
151153
let mut par_cargo = cwd.pop().push(".cargo");
152-
let mut rslt = result::Ok(copy cwd_cargo); // XXX: Bad copy.
154+
let mut rslt = result::Ok(cwd_cargo);
153155

154-
if !os::path_is_dir(&cwd_cargo) && cwd_cargo != p {
156+
if cargo_is_non_root_file {
155157
while par_cargo != p {
156158
if os::path_is_dir(&par_cargo) {
157159
rslt = result::Ok(par_cargo);

0 commit comments

Comments
 (0)