X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fexport_suite.py;h=b39d343b0fbf30b4c5f9c8a2b6abfd22ed3bd001;hb=102dcd21e3b3bf08914b6027eea1977219173b95;hp=03d118496bd408ef7cb6c5b5c27dcf82397a175e;hpb=0f0d16e2f6568553416b3f40cfe134b7ca7fbf73;p=dak.git diff --git a/dak/export_suite.py b/dak/export_suite.py index 03d11849..b39d343b 100644 --- a/dak/export_suite.py +++ b/dak/export_suite.py @@ -76,9 +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) if not os.path.exists(dst): - fs.copy(f.fullpath, dst, symlink=symlink) + fs.copy(af.path, dst, symlink=symlink) fs.commit() if __name__ == '__main__':