patch by: Peter Oliver

* morituri/program/cdparanoia.py:
	  Respect umask for encoded files.  Fixes #17.
This commit is contained in:
Thomas Vander Stichele
2010-04-14 22:01:16 +00:00
parent 3361edbee2
commit 710a9ebb35
2 changed files with 13 additions and 0 deletions

View File

@@ -1,3 +1,10 @@
2010-04-15 Thomas Vander Stichele <thomas at apestaart dot org>
patch by: Peter Oliver
* morituri/program/cdparanoia.py:
Respect umask for encoded files. Fixes #17.
2010-04-14 Thomas Vander Stichele <thomas at apestaart dot org>
* morituri/common/encode.py:

View File

@@ -403,6 +403,10 @@ class ReadVerifyTrackTask(task.MultiSeparateTask):
self.checksum = None
umask = os.umask(0)
os.umask(umask)
self.file_mode = 0666 - umask
def stop(self):
if not self.exception:
self.quality = max(self.tasks[0].quality, self.tasks[2].quality)
@@ -423,6 +427,8 @@ class ReadVerifyTrackTask(task.MultiSeparateTask):
# delete the unencoded file
os.unlink(self._tmpwavpath)
os.chmod(self._tmppath, self.file_mode)
try:
shutil.move(self._tmppath, self.path)
except Exception, e: