Phase 6c fix: hide companion tags from FUSE #77
@@ -447,6 +447,25 @@ impl Filesystem for ClawFuse {
|
|||||||
Some(s) => s,
|
Some(s) => s,
|
||||||
None => continue,
|
None => continue,
|
||||||
};
|
};
|
||||||
|
// Only expose tags whose 32-byte value is a real
|
||||||
|
// blob-id (manifest present). Companion tags like
|
||||||
|
// `<name>.fingerprint` hold a fingerprint hash
|
||||||
|
// with no backing blob — reading them would just
|
||||||
|
// error, so hide them from the listing.
|
||||||
|
let value = match entry.decode_value() {
|
||||||
|
Ok(v) => v,
|
||||||
|
Err(_) => continue,
|
||||||
|
};
|
||||||
|
let blob_id = BlobId::from_bytes(value);
|
||||||
|
let exists = self
|
||||||
|
.runtime
|
||||||
|
.block_on(self.store.load_manifest(&blob_id))
|
||||||
|
.ok()
|
||||||
|
.flatten()
|
||||||
|
.is_some();
|
||||||
|
if !exists {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
let ino = self.alloc_tag_ino(&sanitized, &entry.key);
|
let ino = self.alloc_tag_ino(&sanitized, &entry.key);
|
||||||
entries.push((ino, FileType::RegularFile, sanitized));
|
entries.push((ino, FileType::RegularFile, sanitized));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user