Ignore the path when comparing filenames from the md5 files.
authorDiane Trout <diane@caltech.edu>
Tue, 6 May 2014 22:32:45 +0000 (15:32 -0700)
committerDiane Trout <diane@ghic.org>
Tue, 10 Jun 2014 23:14:09 +0000 (16:14 -0700)
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.

htsworkflow/util/hashfile.py

index af3db764971623b9c3580684ddef2ea90b63ee0c..fcfb7a386edbb1453d85275167be641ab358b236 100644 (file)
@@ -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))