Skip to content
Snippets Groups Projects
Commit 8f6303a1 authored by intrigeri's avatar intrigeri
Browse files

Revert "Improves a bit portability"

This reverts commit d054e313.

os.path.join is *not* suitable for concatenating parts of the basename of
a file.

Closes: #11526
parent 94ca62a4
No related branches found
No related tags found
No related merge requests found
...@@ -51,7 +51,7 @@ class GenericParser(object): ...@@ -51,7 +51,7 @@ class GenericParser(object):
def create_backup_copy(self): def create_backup_copy(self):
""" Create a backup copy """ 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): def do_backup(self):
""" Keep a backup of the file if asked. """ Keep a backup of the file if asked.
...@@ -60,7 +60,7 @@ class GenericParser(object): ...@@ -60,7 +60,7 @@ class GenericParser(object):
but it greatly simplify new strippers implementation. but it greatly simplify new strippers implementation.
""" """
if self.backup: if self.backup:
shutil.move(self.filename, os.path.join(self.filename, '.bak')) shutil.move(self.filename, self.filename + '.bak')
else: else:
mat.secure_remove(self.filename) mat.secure_remove(self.filename)
shutil.move(self.output, self.filename) shutil.move(self.output, self.filename)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment