about summary refs log tree commit diff
path: root/src/comp
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2011-06-29 17:54:05 -0700
committerGraydon Hoare <graydon@mozilla.com>2011-06-29 17:54:05 -0700
commitafabde19dcdae41fa60df37b4aa049f4dfe6ee5f (patch)
tree697a3f3c288192330b8367bb103043a2731085d8 /src/comp
parenta82aeb7af6be8968c7575635283790a73b874118 (diff)
downloadrust-afabde19dcdae41fa60df37b4aa049f4dfe6ee5f.tar.gz
rust-afabde19dcdae41fa60df37b4aa049f4dfe6ee5f.zip
More fixes to fast-check.
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/front/eval.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/comp/front/eval.rs b/src/comp/front/eval.rs
index ce08daf5c50..2dc76bd793b 100644
--- a/src/comp/front/eval.rs
+++ b/src/comp/front/eval.rs
@@ -285,7 +285,11 @@ fn eval_crate_directive(ctx cx, env e, @ast::crate_directive cdir, str prefix,
                 case (some(?f)) { file_path = f; }
                 case (none) { }
             }
-            auto full_path = prefix + std::fs::path_sep() + file_path;
+            auto full_path = if (std::fs::path_is_absolute(file_path)) {
+                file_path
+            } else {
+                prefix + std::fs::path_sep() + file_path
+            };
             if (cx.mode == mode_depend) { cx.deps += [full_path]; ret; }
             auto p0 =
                 new_parser(cx.sess, e, full_path, cx.chpos,
@@ -306,7 +310,11 @@ fn eval_crate_directive(ctx cx, env e, @ast::crate_directive cdir, str prefix,
         case (ast::cdir_dir_mod(?id, ?dir_opt, ?cdirs, ?attrs)) {
             auto path = id;
             alt (dir_opt) { case (some(?d)) { path = d; } case (none) { } }
-            auto full_path = prefix + std::fs::path_sep() + path;
+            auto full_path = if (std::fs::path_is_absolute(path)) {
+                path
+            } else {
+                prefix + std::fs::path_sep() + path
+            };
             auto m0 = eval_crate_directives_to_mod(cx, e, cdirs, full_path);
             auto i = @rec(ident=id,
                           attrs=attrs,