diff options
Diffstat (limited to 'libmat')
| -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) |
