From 2aeb3202a2411da1d56cd5d7fc138ae3a34802b6 Mon Sep 17 00:00:00 2001 From: Alex Garnett Date: Wed, 27 May 2020 11:55:47 -0700 Subject: [PATCH] remove .DS_Store files when bagging, bump version --- gui/package.json | 2 +- moveit.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gui/package.json b/gui/package.json index a95609a..8446bca 100644 --- a/gui/package.json +++ b/gui/package.json @@ -1,6 +1,6 @@ { "name": "sfu-moveit", - "version": "2.0.1", + "version": "2.0.4", "homepage": "https://github.com/axfelix/moveit", "main": "main.js", "description": "An app for producing packages for deposit to the Archives", diff --git a/moveit.py b/moveit.py index d6259f7..48bcf3e 100644 --- a/moveit.py +++ b/moveit.py @@ -20,6 +20,11 @@ def bag_package(self, contactname, jobtitle, department, email, phone, creator, os.makedirs(bag_dir) copy_tree(os.path.normpath(package_folder.strip('"')), bag_dir) + for root, sub, files in os.walk(bag_dir): + for file in files: + if file == ".DS_Store": + os.remove(os.path.abspath(os.path.join(root, file))) + try: bag = bagit.make_bag(bag_dir, None, 1, ['sha256']) bag.info['Package-Time'] = strftime("%Y-%m-%d %H:%M:%S")