make directory absolute
parent
186eab2610
commit
5ef1b7d2f3
|
@ -20,6 +20,7 @@ answer newbie questions, and generally made taiga that much better:
|
||||||
- Andrea Stagi <stagi.andrea@gmail.com>
|
- Andrea Stagi <stagi.andrea@gmail.com>
|
||||||
- Andrés Moya <andres.moya@kaleidos.net>
|
- Andrés Moya <andres.moya@kaleidos.net>
|
||||||
- Andrey Alekseenko <al42and@gmail.com>
|
- Andrey Alekseenko <al42and@gmail.com>
|
||||||
|
- Bruno Clermont <bruno@robotinfra.com>
|
||||||
- Chris Wilson <chris.wilson@aridhia.com>
|
- Chris Wilson <chris.wilson@aridhia.com>
|
||||||
- David Burke <david@burkesoftware.com>
|
- David Burke <david@burkesoftware.com>
|
||||||
- Hector Colina <hcolina@gmail.com>
|
- Hector Colina <hcolina@gmail.com>
|
||||||
|
|
|
@ -41,7 +41,7 @@ class FileSystemStorage(storage.FileSystemStorage):
|
||||||
# Note that there is a race between os.path.exists and os.makedirs:
|
# Note that there is a race between os.path.exists and os.makedirs:
|
||||||
# if os.makedirs fails with EEXIST, the directory was created
|
# if os.makedirs fails with EEXIST, the directory was created
|
||||||
# concurrently, and we can continue normally. Refs #16082.
|
# 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):
|
if not os.path.exists(directory):
|
||||||
try:
|
try:
|
||||||
if self.directory_permissions_mode is not None:
|
if self.directory_permissions_mode is not None:
|
||||||
|
|
Loading…
Reference in New Issue