Ticket #13518: storage_perms.patch

File storage_perms.patch, 570 bytes (added by jacob@…, 15 years ago)
  • storage.py

    old new  
    143143
    144144        directory = os.path.dirname(full_path)
    145145        if not os.path.exists(directory):
    146             os.makedirs(directory)
     146            if settings.FILE_UPLOAD_PERMISSIONS is not None:
     147                os.makedirs(directory, settings.FILE_UPLOAD_PERMISSIONS)
     148            else:
     149                os.makedirs(directory)
    147150        elif not os.path.isdir(directory):
    148151            raise IOError("%s exists and is not a directory." % directory)
    149152
Back to Top