File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
branches/try/src/librustc/metadata Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 19dfec2aaf746535de1521f68421f9980dbf25de
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
5
- refs/heads/try: 72c04a9ffe0f8d164599e2f24f02277f1499f089
5
+ refs/heads/try: 5ff6beed60fe3a1b783968deda9b5ca99afbeba6
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
Original file line number Diff line number Diff line change @@ -148,10 +148,12 @@ fn get_cargo_root_nearest() -> Result<Path, ~str> {
148
148
do result:: chain( get_cargo_root( ) ) |p| {
149
149
let cwd = os:: getcwd( ) ;
150
150
let cwd_cargo = cwd. push( ".cargo" ) ;
151
+ let cargo_is_non_root_file =
152
+ !os:: path_is_dir( & cwd_cargo) && cwd_cargo != p;
151
153
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) ;
153
155
154
- if !os :: path_is_dir ( & cwd_cargo ) && cwd_cargo != p {
156
+ if cargo_is_non_root_file {
155
157
while par_cargo != p {
156
158
if os:: path_is_dir( & par_cargo) {
157
159
rslt = result:: Ok ( par_cargo) ;
You can’t perform that action at this time.
0 commit comments