mirror of
https://github.com/qwjyh/xdbm
synced 2024-12-05 04:51:04 +09:00
fix: apply subpath logic patch to util::min_parent_storage
This commit is contained in:
parent
ced354bf58
commit
6a0abd03d5
1 changed files with 4 additions and 1 deletions
|
@ -21,7 +21,10 @@ pub fn min_parent_storage<'a>(
|
|||
.filter_map(|(k, storage)| {
|
||||
let storage_path = storage.mount_path(device)?;
|
||||
let diff = pathdiff::diff_paths(path, storage_path)?;
|
||||
if diff.components().any(|c| c == path::Component::ParentDir) {
|
||||
if diff
|
||||
.components()
|
||||
.any(|c| matches!(c, path::Component::ParentDir | path::Component::Prefix(_)))
|
||||
{
|
||||
None
|
||||
} else {
|
||||
Some((k, diff))
|
||||
|
|
Loading…
Reference in a new issue