summaryrefslogtreecommitdiff
path: root/libssh2-sys/build.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-15 00:04:51 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-03-15 00:04:51 -0700
commit33d7f2ef4a255ccb2d3f7d0982093b2babab1b96 (patch)
treed830ad067f51d0e934b09845493a70472acae97d /libssh2-sys/build.rs
parent161fd3649444263cae57a564585e7e2060a37bb4 (diff)
downloadssh2-rs-33d7f2ef4a255ccb2d3f7d0982093b2babab1b96.zip
Update to rust master
Diffstat (limited to 'libssh2-sys/build.rs')
-rw-r--r--libssh2-sys/build.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/libssh2-sys/build.rs b/libssh2-sys/build.rs
index d6e18ec..b9881b0 100644
--- a/libssh2-sys/build.rs
+++ b/libssh2-sys/build.rs
@@ -1,4 +1,4 @@
-#![feature(path, fs_walk)]
+#![feature(fs_walk)]
extern crate "pkg-config" as pkg_config;
@@ -95,8 +95,9 @@ fn main() {
let file = file.unwrap().path();
if fs::metadata(&file).map(|m| m.is_file()) != Ok(true) { continue }
- let part = file.relative_from(&root).unwrap();
- let dst = dst.join(part);
+ let mut root = root.iter();
+ let mut dst = dst.clone();
+ dst.extend(file.iter().skip_while(|c| Some(*c) == root.next()));
fs::create_dir_all(dst.parent().unwrap()).unwrap();
fs::copy(&file, &dst).unwrap();
}