changeset 5395:d944c9b537dc

packages: fixed wrong used config.umask and exchanged os.chmod by filesys.chmod
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Thu, 24 Dec 2009 20:50:35 +0100
parents cbd72078ad91
children 6e7f1b059a3c
files MoinMoin/packages.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/packages.py	Tue Dec 08 22:36:52 2009 +0100
+++ b/MoinMoin/packages.py	Thu Dec 24 20:50:35 2009 +0100
@@ -14,6 +14,7 @@
 from MoinMoin.Page import Page
 from MoinMoin.PageEditor import PageEditor
 from MoinMoin.logfile import editlog, eventlog
+from MoinMoin.util import filesys
 
 MOIN_PACKAGE_FILE = 'MOIN_PACKAGE'
 MAX_VERSION = 1
@@ -138,7 +139,7 @@
             if not os.path.exists(target):
                 self._extractToFile(zipname, target)
                 if os.path.exists(target):
-                    os.chmod(target, config.umask )
+                    filesys.chmod(target, 0666 & config.umask)
                     action = 'ATTNEW'
                     edit_logfile_append(self, pagename, path, rev, action, logname='edit-log',
                                        comment=u'%(filename)s' % {"filename": filename}, author=author)
@@ -347,7 +348,7 @@
             target = os.path.join(attachments, filename)
             self._extractToFile(zipname, target)
             if os.path.exists(target):
-                os.chmod(target, config.umask )
+                filesys.chmod(target, 0666 & config.umask)
         else:
             self.msg += u"action replace underlay attachment: not enough rights - nothing done \n"