[SCM] morituri/master: * morituri/common/encode.py: Before moving the newly tagged file to overwrite the original one, copy over mode.

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Oct 19 20:09:18 UTC 2014


The following commit has been merged in the master branch:
commit 3361edbee2b8e985bb3770a150b109c86d0fc797
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Wed Apr 14 21:44:09 2010 +0000

    	* morituri/common/encode.py:
    	  Before moving the newly tagged file to overwrite the original
    	  one, copy over mode.

diff --git a/ChangeLog b/ChangeLog
index d9d4b34..33b4bf0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2010-04-14  Thomas Vander Stichele  <thomas at apestaart dot org>
 
+	* morituri/common/encode.py:
+	  Before moving the newly tagged file to overwrite the original
+	  one, copy over mode.
+
+2010-04-14  Thomas Vander Stichele  <thomas at apestaart dot org>
+
 	* morituri/common/program.py:
 	  Commit one missing line from patch in #4 for multi-artist discs.
 
diff --git a/morituri/common/encode.py b/morituri/common/encode.py
index 7ec53f2..15a492e 100644
--- a/morituri/common/encode.py
+++ b/morituri/common/encode.py
@@ -22,6 +22,7 @@
 
 import math
 import os
+import shutil
 import tempfile
 
 from morituri.common import common, task, checksum
@@ -487,6 +488,8 @@ class SafeRetagTask(task.MultiSeparateTask):
                     self.debug('comparing checksums %08x and %08x' % (c1, c2))
                     if c1 == c2:
                         # data is fine, so we can now move
+                        # but first, copy original mode to our temporary file
+                        shutil.copymode(self._path, self._tmppath)
                         self.debug('moving temporary file to %r' % self._path)
                         os.rename(self._tmppath, self._path)
                     else:

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list