mirror of
https://github.com/Hopiu/django-rosetta.git
synced 2026-04-28 08:54:44 +00:00
Add bool indicating case sensitive file system.
This commit is contained in:
parent
d4ee6ca736
commit
18001e170a
1 changed files with 7 additions and 0 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Reference in a new issue