summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Nowicki <sebnow@gmail.com>2017-10-16 15:29:55 +0200
committerAndrew Gallant <jamslam@gmail.com>2017-10-20 20:51:12 -0400
commit363a4fa9b733c02b47c63f37c85244f2352fe260 (patch)
tree62a87921be9636a64e63cdda2198424ccf113eac
parent712311fdc6f569960ad80716e1b3071886df1821 (diff)
Fix path passed to try_create_bytes()
-rw-r--r--tests/workdir.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/workdir.rs b/tests/workdir.rs
index afa876bf..1433f835 100644
--- a/tests/workdir.rs
+++ b/tests/workdir.rs
@@ -50,7 +50,8 @@ impl WorkDir {
/// Try to create a new file with the given name and contents in this
/// directory.
pub fn try_create<P: AsRef<Path>>(&self, name: P, contents: &str) -> io::Result<()> {
- self.try_create_bytes(name, contents.as_bytes())
+ let path = self.dir.join(name);
+ self.try_create_bytes(path, contents.as_bytes())
}
/// Create a new file with the given name and size.