diff --git a/restclients_core/util/mock.py b/restclients_core/util/mock.py
index <HASH>..<HASH> 100644
--- a/restclients_core/util/mock.py
+++ b/restclients_core/util/mock.py
@@ -175,4 +175,4 @@ def attempt_open_query_permutations(url, orig_file_path, is_header_file):
 
 def _compare_file_name(orig_file_path, directory, filename):
     return (len(unquote(orig_file_path)) - len(unquote(directory)) ==
-            len(filename))
+            len(unquote(filename)))
Switching both sides of file comparison to unquoted