- bn = os.path.basename(path)
- ef = ExistingFile(path)
-
- m.source_file.save(bn, ef)
+
+ abs_path = os.path.join(NEW_PATH, path)
+ m.source_file.save(
+ path,
+ ExistingFile(abs_path))
+
+ f = open(m.source_file.path)
+ m.source_sha1 = sha1_file(f)
+ f.close()