summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri2017-03-18 11:21:57 +0000
committerintrigeri2017-03-18 11:25:20 +0000
commit8f6303a1f26fe8dad83ba96ab8328dbdfa3af59a (patch)
tree7461747ec59b3c5ecdc91ee0797f4da95812ffe9
parent94ca62a429bb6a3a5f293de26053e54bbfeea9f9 (diff)
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
-rw-r--r--libmat/parser.py4
1 files changed, 2 insertions, 2 deletions
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):
51 def create_backup_copy(self): 51 def create_backup_copy(self):
52 """ Create a backup copy 52 """ Create a backup copy
53 """ 53 """
54 shutil.copy2(self.filename, os.path.join(self.filename, '.bak')) 54 shutil.copy2(self.filename, self.filename + '.bak')
55 55
56 def do_backup(self): 56 def do_backup(self):
57 """ Keep a backup of the file if asked. 57 """ Keep a backup of the file if asked.
@@ -60,7 +60,7 @@ class GenericParser(object):
60 but it greatly simplify new strippers implementation. 60 but it greatly simplify new strippers implementation.
61 """ 61 """
62 if self.backup: 62 if self.backup:
63 shutil.move(self.filename, os.path.join(self.filename, '.bak')) 63 shutil.move(self.filename, self.filename + '.bak')
64 else: 64 else:
65 mat.secure_remove(self.filename) 65 mat.secure_remove(self.filename)
66 shutil.move(self.output, self.filename) 66 shutil.move(self.output, self.filename)