From 2a3c4315822e900d40142e80b58fb7f9b25af51a Mon Sep 17 00:00:00 2001 From: Luca Venturini Date: Tue, 30 Jul 2019 15:15:06 +0100 Subject: [PATCH] Small BF for avoiding shutil.move to crash when /tmp and work directory are on different file systems. --- Mikado/scales/compare.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mikado/scales/compare.py b/Mikado/scales/compare.py index 0caeb99d6..2b35fbed8 100644 --- a/Mikado/scales/compare.py +++ b/Mikado/scales/compare.py @@ -646,7 +646,8 @@ def create_index(reference, queue_logger, index_name, ref_gff=False, conn.commit() conn.close() - shutil.move(temp_db, index_name) + shutil.copy(temp_db, index_name) + os.remove(temp_db) return