X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=dak%2Fexport_suite.py;h=b39d343b0fbf30b4c5f9c8a2b6abfd22ed3bd001;hb=102dcd21e3b3bf08914b6027eea1977219173b95;hp=a4a595310657fee1b5c6b3a0c8733b8435a4e464;hpb=09a1a20566dcf84ca229b4339bd8f8080eb59afd;p=dak.git diff --git a/dak/export_suite.py b/dak/export_suite.py index a4a59531..b39d343b 100644 --- a/dak/export_suite.py +++ b/dak/export_suite.py @@ -76,8 +76,13 @@ def main(argv=None): with FilesystemTransaction() as fs: for f in files: + af = session.query(ArchiveFile) \ + .join(ArchiveFile.component).join(ArchiveFile.file) \ + .filter(ArchiveFile.archive == suite.archive) \ + .filter(ArchiveFile.file == f).first() dst = os.path.join(directory, f.basename) - fs.copy(f.fullpath, dst, symlink=symlink) + if not os.path.exists(dst): + fs.copy(af.path, dst, symlink=symlink) fs.commit() if __name__ == '__main__':