Fix handling file names with periods before the file extension.
This commit is contained in:
@@ -83,7 +83,7 @@ pub fn parse_file_with_settings<'g, 's, P: AsRef<Path>>(
|
||||
let full_path = file_path.as_ref().canonicalize()?;
|
||||
if doc.category.is_none() {
|
||||
let category = full_path
|
||||
.file_prefix()
|
||||
.file_stem()
|
||||
.expect("File should have a name.")
|
||||
.to_str()
|
||||
.expect("File name should be valid utf-8.");
|
||||
|
||||
Reference in New Issue
Block a user