From 96ac9b5e31ec87effaebe7883b1926d3a18f5396 Mon Sep 17 00:00:00 2001 From: Chris Adams Date: Mon, 9 Jul 2018 11:47:56 -0400 Subject: [PATCH] Manifest checker: test for different_case earlier (see #119) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This ensures that the test won’t flag the file it just added for any case where the filename isn’t already lowercased. --- .../gov/loc/repository/bagit/conformance/ManifestChecker.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/gov/loc/repository/bagit/conformance/ManifestChecker.java b/src/main/java/gov/loc/repository/bagit/conformance/ManifestChecker.java index af9438c26..e5288d62c 100644 --- a/src/main/java/gov/loc/repository/bagit/conformance/ManifestChecker.java +++ b/src/main/java/gov/loc/repository/bagit/conformance/ManifestChecker.java @@ -123,9 +123,9 @@ private static void checkManifestPayload(final Path manifestFile, final Charset String path = parsePath(line); path = checkForManifestCreatedWithMD5SumTools(path, warnings, warningsToIgnore); - paths.add(path.toLowerCase()); - checkForDifferentCase(path, paths, manifestFile, warnings, warningsToIgnore); + paths.add(path.toLowerCase()); + if(encoding.name().startsWith("UTF")){ checkNormalization(path, manifestFile.getParent(), warnings, warningsToIgnore); }