From 2ff1562ab120dc3fc35091f19ab05338b3c42a01 Mon Sep 17 00:00:00 2001 From: Rob McMullen Date: Mon, 22 Nov 2021 05:10:42 -0800 Subject: [PATCH] Use basename of file as name to store in directory when adding file to ATR image --- atrcopy/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/atrcopy/__init__.py b/atrcopy/__init__.py index e1375a4..76beb62 100644 --- a/atrcopy/__init__.py +++ b/atrcopy/__init__.py @@ -153,6 +153,7 @@ def add_files(image, files): for name in files: with open(name, "rb") as fh: data = fh.read() + name = os.path.basename(name) changed = save_file(image, name, filetype, data) if changed: image.save()