From 8f6303a1f26fe8dad83ba96ab8328dbdfa3af59a Mon Sep 17 00:00:00 2001 From: intrigeri Date: Sat, 18 Mar 2017 11:21:57 +0000 Subject: Revert "Improves a bit portability" This reverts commit d054e313d7d83ec0089f7e0efe6b8a988fe99b3a. os.path.join is *not* suitable for concatenating parts of the basename of a file. Closes: #11526 --- libmat/parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libmat') diff --git a/libmat/parser.py b/libmat/parser.py index b81b576..73bebdd 100644 --- a/libmat/parser.py +++ b/libmat/parser.py @@ -51,7 +51,7 @@ class GenericParser(object): def create_backup_copy(self): """ Create a backup copy """ - shutil.copy2(self.filename, os.path.join(self.filename, '.bak')) + shutil.copy2(self.filename, self.filename + '.bak') def do_backup(self): """ Keep a backup of the file if asked. @@ -60,7 +60,7 @@ class GenericParser(object): but it greatly simplify new strippers implementation. """ if self.backup: - shutil.move(self.filename, os.path.join(self.filename, '.bak')) + shutil.move(self.filename, self.filename + '.bak') else: mat.secure_remove(self.filename) shutil.move(self.output, self.filename) -- cgit v1.3