Fix handling file names with periods before the file extension.
Some checks failed
rust-build Build rust-build has succeeded
rust-test Build rust-test has failed
rust-foreign-document-test Build rust-foreign-document-test has failed

This commit is contained in:
Tom Alexander
2023-09-30 01:26:24 -04:00
parent 6ed35f4674
commit d38b0a84f6
3 changed files with 7 additions and 2 deletions

View File

@@ -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.");