[Pkg-privacy-commits] [mat] 03/06: New patch (Revert-Improves-a-bit-portability.patch), to fix the --backup option, which is available in the CLI, GUI, and forcibly enabled in the Nautilus extension.
Intrigeri
intrigeri at moszumanska.debian.org
Sat Mar 18 12:37:50 UTC 2017
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to branch master
in repository mat.
commit f6d03ea17a196ed8f57938df46b8305a1ac01acf
Author: intrigeri <intrigeri at boum.org>
Date: Sat Mar 18 11:27:20 2017 +0000
New patch (Revert-Improves-a-bit-portability.patch), to fix the --backup option, which is available in the CLI, GUI, and forcibly enabled in the Nautilus extension.
---
.../Revert-Improves-a-bit-portability.patch | 37 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 38 insertions(+)
diff --git a/debian/patches/Revert-Improves-a-bit-portability.patch b/debian/patches/Revert-Improves-a-bit-portability.patch
new file mode 100644
index 0000000..6c364d5
--- /dev/null
+++ b/debian/patches/Revert-Improves-a-bit-portability.patch
@@ -0,0 +1,37 @@
+From: intrigeri <intrigeri at boum.org>
+Date: Sat, 18 Mar 2017 11:21:57 +0000
+Origin: https://0xacab.org/mat/mat/commit/8f6303a1f26fe8dad83ba96ab8328dbdfa3af59a
+Subject: 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
+---
+ libmat/parser.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libmat/parser.py b/libmat/parser.py
+index 2a82a25..1b58f87 100644
+--- a/libmat/parser.py
++++ b/libmat/parser.py
+@@ -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)
diff --git a/debian/patches/series b/debian/patches/series
index 381fd18..09f1caf 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
Disable-PDF-support.-Closes-826101.patch
Make-the-Nautilus-extension-work-again.patch
+Revert-Improves-a-bit-portability.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/mat.git
More information about the Pkg-privacy-commits
mailing list