(warning: python newbie submission) Platforms: W2K w/Activestate 2.1.1 (same library source found in 2.0 and 2.11 on NetBSD). filecmp.dircmp performs incorrect filename comparisons when building lists of common and directory-unique files. In particular, it sets a dictionary key to the filename (and value to 1) for each file in the right-hand tree, and looks for matching names (has_key). This fails on case-insensitive platforms when the names are equivalent except for case. A simple workaround would be to use os.path.normcase() around the filenames before storing and comparing, but this is not case-preserving. Case preservation is to be preferred. A case-preserving workaround might use os.path.normcase() for the dictionary entry keys, but store the unchanged filename as the value, and use that value when constructing the list from the dictionary. -- Rik creating tomorrow's legacy systems, today
Logged In: YES user_id=6380 While this was reported as an ActivePython bug, the problem is the same with filecmp.py in CVS, so I'm unassigning this from Paul (it's not like Paul's track record of responding to bug reports is so great :-).
Logged In: YES user_id=3066 I've attached a preliminary patch for this, completely untested. Problems: - We don't have any tests for the filecmp module. - Im not running Windows, so I can't test this in an environment similar to that for which the bug was reported. If someone can create a test case for this, and test the patch, that would really help.