mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-01-19 05:49:14 +02:00
Fix path passed to try_create_bytes()
This commit is contained in:
parent
712311fdc6
commit
363a4fa9b7
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user