Skip to main content

default_send_file_name

Function default_send_file_name 

Source
pub(crate) fn default_send_file_name(file_name: Option<&str>) -> String
Expand description

Derive the file name to save a received Send’s file under.

The name comes from the decrypted Send, i.e. it is chosen by whoever created the Send, so it is reduced to its final component before use: without that, a Send named ../../x or /etc/x would decide where bw receive writes. Matches legacy’s path.basename(...), with the same timestamped fallback when the Send carries no file name.