handle the database

This commit is contained in:
Floris Bruynooghe
2023-02-02 17:43:12 +01:00
parent 5f29b93970
commit 3267596a30
3 changed files with 28 additions and 6 deletions

View File

@@ -242,7 +242,8 @@ impl<'a> BlobObject<'a> {
/// including the dot. E.g. "foo.txt" is returned as `("foo",
/// ".txt")` while "bar" is returned as `("bar", "")`.
///
/// The extension part will always be lowercased.
/// The extension part will always be lowercased. Note that [`imex::transfer`] relies
/// on this for safety, if uppercase extensions are ever allowed it needs to be adapted.
fn sanitise_name(name: &str) -> (String, String) {
let mut name = name.to_string();
for part in name.rsplit('/') {