Fix dedup logic
This commit is contained in:
parent
1f4ea3091a
commit
0ab89ccf01
1 changed files with 3 additions and 2 deletions
|
|
@ -220,8 +220,9 @@ async fn get_deduped_file_name(
|
||||||
transaction: &mut Transaction<'_>,
|
transaction: &mut Transaction<'_>,
|
||||||
path: &str,
|
path: &str,
|
||||||
) -> Result<String, SyncServerError> {
|
) -> Result<String, SyncServerError> {
|
||||||
let mut parts = path.rsplitn(2, '.');
|
let parts = path.rsplitn(2, '.').collect::<Vec<_>>();
|
||||||
let (stem, extension) = match (parts.next(), parts.next()) {
|
let mut reverse_parts = parts.into_iter().rev();
|
||||||
|
let (stem, extension) = match (reverse_parts.next(), reverse_parts.next()) {
|
||||||
(Some(stem), maybe_extension) => (
|
(Some(stem), maybe_extension) => (
|
||||||
stem,
|
stem,
|
||||||
maybe_extension
|
maybe_extension
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue