include normalized filenames in the rename list

Since they'll need to be uploaded on the next sync, better not to
hide them from the list
This commit is contained in:
Damien Elmes 2020-02-11 09:50:06 +10:00
parent c347c9aee8
commit 9913dcd5dc

View File

@ -121,15 +121,10 @@ where
} }
// rename if required // rename if required
let (norm_name, renamed) = self.normalize_and_maybe_rename(ctx, &disk_fname)?; let (norm_name, renamed_on_disk) = self.normalize_and_maybe_rename(ctx, &disk_fname)?;
if renamed { if renamed_on_disk {
let orig_as_nfc = normalize_to_nfc(&disk_fname); out.renamed
// if the only difference is the unicode normalization, .insert(disk_fname.to_string(), norm_name.to_string());
// we don't mark the file as a renamed file
if orig_as_nfc.as_ref() != norm_name.as_ref() {
out.renamed
.insert(orig_as_nfc.to_string(), norm_name.to_string());
}
} }
out.files.push(norm_name.into_owned()); out.files.push(norm_name.into_owned());