Skip to main content

is_valid_volume_label

Function is_valid_volume_label 

Source
pub(super) fn is_valid_volume_label(label: &str) -> bool
Expand description

A drive label is exactly one ASCII letter followed by ':' (“C:”, “d:”) — the shape list_ntfs_volumes produces and snapshot_path expects. This is the trust boundary for Engine::index_start: validating here bounds the set of distinct labels to a small finite set (so a hostile caller can’t spawn unbounded volume threads) and stops a label bearing ..\ or path separators from steering snapshot_path outside the index directory.