Skip to content

Commit 4cce4e4

Browse files
authored
Update bfield::create() to use full path not just filename (#4)
1 parent db9e113 commit 4cce4e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bfield.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ impl<'a, T: Clone + DeserializeOwned + Serialize> BField<T> {
3232
let mut members = Vec::new();
3333
for n in 0..n_secondaries {
3434
// panics if filename == ''
35-
let file = Path::with_extension(
35+
let file = filename.as_ref().with_file_name(Path::with_extension(
3636
Path::file_stem(filename.as_ref()).unwrap().as_ref(),
3737
format!("{}.bfd", n),
38-
);
38+
));
3939
let params = if n == 0 {
4040
Some(other_params.clone())
4141
} else {

0 commit comments

Comments
 (0)