Skip to content

Commit aba92a5

Browse files
authored
Merge pull request #1367 from cmu-delphi/krivard/fix-filesystem-archiver
Make FilesystemArchiveDiffer actually apply changes to cache
2 parents 0ec3aea + 97748a8 commit aba92a5

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

_delphi_utils_python/delphi_utils/archive.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,8 +641,23 @@ def archive_exports(self, exported_files):
641641
successes: All files from input
642642
fails: Empty list
643643
"""
644+
archive_success, archive_fail = [], []
645+
for exported_file in exported_files:
646+
archive_file = abspath(
647+
join(self.cache_dir, basename(exported_file)))
648+
649+
# Copy export to cache
650+
try:
651+
# Archive
652+
shutil.copyfile(exported_file, archive_file)
653+
archive_success.append(exported_file)
654+
655+
except FileNotFoundError as ex:
656+
print(ex)
657+
archive_fail.append(exported_file)
658+
644659
self._exports_archived = True
645-
return exported_files, []
660+
return archive_success, archive_fail
646661

647662
def update_cache(self):
648663
"""Handle cache updates with a no-op.

0 commit comments

Comments
 (0)