From 9913dcd5dc4d07b3063ed44f4e11ab223d5223dd Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 11 Feb 2020 09:50:06 +1000 Subject: [PATCH] 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 --- rslib/src/media/check.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/rslib/src/media/check.rs b/rslib/src/media/check.rs index 1b6c9d535..b945bc355 100644 --- a/rslib/src/media/check.rs +++ b/rslib/src/media/check.rs @@ -121,15 +121,10 @@ where } // rename if required - let (norm_name, renamed) = self.normalize_and_maybe_rename(ctx, &disk_fname)?; - if renamed { - let orig_as_nfc = normalize_to_nfc(&disk_fname); - // if the only difference is the unicode normalization, - // 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()); - } + let (norm_name, renamed_on_disk) = self.normalize_and_maybe_rename(ctx, &disk_fname)?; + if renamed_on_disk { + out.renamed + .insert(disk_fname.to_string(), norm_name.to_string()); } out.files.push(norm_name.into_owned());