From: Diane Trout Date: Tue, 6 May 2014 22:32:45 +0000 (-0700) Subject: Ignore the path when comparing filenames from the md5 files. X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=5fa05df54d99a784fce669a02d8c88710aea2276;ds=sidebyside Ignore the path when comparing filenames from the md5 files. There were too many other ways of creating them or running the md5 file creation from too many different places for including the relative path to be reliable. --- diff --git a/htsworkflow/util/hashfile.py b/htsworkflow/util/hashfile.py index af3db76..fcfb7a3 100644 --- a/htsworkflow/util/hashfile.py +++ b/htsworkflow/util/hashfile.py @@ -40,8 +40,8 @@ def make_md5sum_unix(filename, md5_cache): def parse_md5sum_line(lines, filename): md5sum, md5sum_filename = lines[0].split() - md5sum_filename = os.path.normpath(md5sum_filename) - filename = os.path.normpath(filename) + md5sum_filename = os.path.basename(md5sum_filename) + filename = os.path.basename(filename) if md5sum_filename != filename: errmsg = "MD5sum and I disagre about filename. {0} != {1}" logger.error(errmsg.format(filename, md5sum_filename))