diff options
-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. |