Skip to content

Commit fb6f053

Browse files
committed
Make FilesystemArchiveDiffer actually apply changes to cache
1 parent 5891f72 commit fb6f053

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

_delphi_utils_python/delphi_utils/archive.py

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

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

0 commit comments

Comments
 (0)