[Backport] make directory absolute

remotes/origin/issue/4795/notification_even_they_are_disabled
Bruno 2016-01-23 16:13:52 +08:00 committed by Alejandro Alonso
parent 96596dcc3e
commit a727b79ed3
2 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@ answer newbie questions, and generally made taiga that much better:
- Andrea Stagi <stagi.andrea@gmail.com>
- Andrés Moya <andres.moya@kaleidos.net>
- Andrey Alekseenko <al42and@gmail.com>
- Bruno Clermont <bruno@robotinfra.com>
- Chris Wilson <chris.wilson@aridhia.com>
- David Burke <david@burkesoftware.com>
- Hector Colina <hcolina@gmail.com>

View File

@ -41,7 +41,7 @@ class FileSystemStorage(storage.FileSystemStorage):
# Note that there is a race between os.path.exists and os.makedirs:
# if os.makedirs fails with EEXIST, the directory was created
# concurrently, and we can continue normally. Refs #16082.
directory = os.path.dirname(name)
directory = os.path.join(settings.MEDIA_ROOT, os.path.dirname(name))
if not os.path.exists(directory):
try:
if self.directory_permissions_mode is not None: