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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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)