diff options
| author | jvoisin | 2015-11-03 17:12:38 +0100 |
|---|---|---|
| committer | jvoisin | 2015-11-03 17:12:38 +0100 |
| commit | d054e313d7d83ec0089f7e0efe6b8a988fe99b3a (patch) | |
| tree | c939c94c9a4e33b59163ea274d09b08003858dc2 | |
| parent | 627c6f4fb042440ccf4a206cc78da164138ae91c (diff) | |
Improves a bit portability
| -rw-r--r-- | libmat/parser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libmat/parser.py b/libmat/parser.py index c6ba0a4..23cad6b 100644 --- a/libmat/parser.py +++ b/libmat/parser.py | |||
| @@ -120,7 +120,7 @@ class GenericParser(object): | |||
| 120 | def create_backup_copy(self): | 120 | def create_backup_copy(self): |
| 121 | """ Create a backup copy | 121 | """ Create a backup copy |
| 122 | """ | 122 | """ |
| 123 | shutil.copy2(self.filename, self.filename + '.bak') | 123 | shutil.copy2(self.filename, os.path.join(self.filename, '.bak')) |
| 124 | 124 | ||
| 125 | def do_backup(self): | 125 | def do_backup(self): |
| 126 | """ Keep a backup of the file if asked. | 126 | """ Keep a backup of the file if asked. |
| @@ -129,7 +129,7 @@ class GenericParser(object): | |||
| 129 | but it greatly simplify new strippers implementation. | 129 | but it greatly simplify new strippers implementation. |
| 130 | """ | 130 | """ |
| 131 | if self.backup: | 131 | if self.backup: |
| 132 | shutil.move(self.filename, self.filename + '.bak') | 132 | shutil.move(self.filename, os.path.join(self.filename, '.bak')) |
| 133 | else: | 133 | else: |
| 134 | mat.secure_remove(self.filename) | 134 | mat.secure_remove(self.filename) |
| 135 | shutil.move(self.output, self.filename) | 135 | shutil.move(self.output, self.filename) |
