Merge pull request #1333 from matthiasbeyer/libimagcontact/fix-uuid-fetching
Fix: use Path::file_stem() instead of Path::file_name()
This commit is contained in:
commit
0977fe5c36
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ impl UniqueRefPathGenerator for UniqueContactPathGenerator {
|
|||
fn unique_hash<A: AsRef<Path>>(path: A) -> RResult<String, Self::Error> {
|
||||
debug!("Generating unique hash for path: {:?}", path.as_ref());
|
||||
|
||||
if let Some(p) = path.as_ref().file_name().and_then(OsStr::to_str).map(String::from) {
|
||||
if let Some(p) = path.as_ref().file_stem().and_then(OsStr::to_str).map(String::from) {
|
||||
debug!("Found UUID string: '{}'", p);
|
||||
Uuid::parse_str(&p)
|
||||
.map_err(CE::from)
|
||||
|
|
Loading…
Reference in a new issue