diff options
author | Sebastian Nowicki <sebnow@gmail.com> | 2017-10-16 15:29:55 +0200 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2017-10-20 20:51:12 -0400 |
commit | 363a4fa9b733c02b47c63f37c85244f2352fe260 (patch) | |
tree | 62a87921be9636a64e63cdda2198424ccf113eac | |
parent | 712311fdc6f569960ad80716e1b3071886df1821 (diff) |
Fix path passed to try_create_bytes()
-rw-r--r-- | tests/workdir.rs | 3 |
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. |