From 80b3ff5b91b079b94c1e12803246e190ad61c731 Mon Sep 17 00:00:00 2001 From: j Date: Sat, 12 Jan 2019 23:40:19 +0530 Subject: [PATCH] unlink duplicates --- oml/item/scan.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/oml/item/scan.py b/oml/item/scan.py index 950c2fd..6c966b6 100644 --- a/oml/item/scan.py +++ b/oml/item/scan.py @@ -151,6 +151,9 @@ def run_scan(): f2 = os.path.join(prefix, f) if f1 != f2 and os.path.exists(f1) and os.path.exists(f2): logger.debug('"%s" vs "%s"', f1, f2) + os.chmod(f2, stat.S_IWRITE) + os.unlink(f2) + continue else: ids.add(id)