From 363a4fa9b733c02b47c63f37c85244f2352fe260 Mon Sep 17 00:00:00 2001 From: Sebastian Nowicki Date: Mon, 16 Oct 2017 15:29:55 +0200 Subject: [PATCH] Fix path passed to try_create_bytes() --- tests/workdir.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/workdir.rs b/tests/workdir.rs index afa876b..1433f83 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>(&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.