1
0
mirror of https://github.com/django/django.git synced 2025-10-30 09:06:13 +00:00

Refs #27795 -- Removed force_bytes() usage in utils/_os.py.

This commit is contained in:
Jon Dufresne
2018-09-25 08:27:36 -07:00
committed by Tim Graham
parent 9a0e0d966a
commit bb81c22d90
3 changed files with 8 additions and 16 deletions

View File

@@ -3,7 +3,6 @@ import tempfile
from os.path import abspath, dirname, join, normcase, sep
from django.core.exceptions import SuspiciousFileOperation
from django.utils.encoding import force_text
# For backwards-compatibility in Django 2.0
abspathu = abspath
@@ -30,8 +29,6 @@ def safe_join(base, *paths):
Raise ValueError if the final path isn't located inside of the base path
component.
"""
base = force_text(base)
paths = [force_text(p) for p in paths]
final_path = abspath(join(base, *paths))
base_path = abspath(base)
# Ensure final_path starts with base_path (using normcase to ensure we