Add bool indicating case sensitive file system.

This commit is contained in:
Jim 2019-03-22 10:37:48 +00:00
parent d4ee6ca736
commit 18001e170a

View file

@ -1,4 +1,5 @@
import os
import tempfile
from datetime import datetime
import django
@ -54,6 +55,12 @@ def find_pos(lang, project_apps=True, django_apps=False, third_party_apps=False)
if os.path.exists(os.path.abspath(os.path.join(os.path.dirname(project.__file__), '..', 'locale'))):
paths.append(os.path.abspath(os.path.join(os.path.dirname(project.__file__), '..', 'locale')))
case_sensitive_file_system = True
tmphandle, tmppath = tempfile.mkstemp()
if os.path.exists(tmppath.upper()):
# Case insensitive file system.
case_sensitive_file_system = False
# django/locale
if django_apps:
django_paths = cache.get('rosetta_django_paths')