From d943b0c339fe3d35ffdf9f580ccb7a55915c6854 Mon Sep 17 00:00:00 2001 From: "Feng, Bob C" Date: Wed, 23 Jan 2019 10:16:00 +0800 Subject: BaseTools: Handle the bytes and str difference Deal with bytes and str is different, remove the unicode(), correct open file parameter. Using utcfromtimestamp instead of fromtimestamp. Cc: Bob Feng Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan Tested-by: Laszlo Ersek Tested-by: Ard Biesheuvel Reviewed-by: Liming Gao Reviewed-by: Bob Feng --- BaseTools/Source/Python/Common/LongFilePathOs.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'BaseTools/Source/Python/Common/LongFilePathOs.py') diff --git a/BaseTools/Source/Python/Common/LongFilePathOs.py b/BaseTools/Source/Python/Common/LongFilePathOs.py index 53528546b7..3d6fe9b01c 100644 --- a/BaseTools/Source/Python/Common/LongFilePathOs.py +++ b/BaseTools/Source/Python/Common/LongFilePathOs.py @@ -15,7 +15,6 @@ from __future__ import absolute_import import os from . import LongFilePathOsPath from Common.LongFilePathSupport import LongFilePath -from Common.LongFilePathSupport import UniToStr import time path = LongFilePathOsPath @@ -64,7 +63,7 @@ def listdir(path): List = [] uList = os.listdir(u"%s" % LongFilePath(path)) for Item in uList: - List.append(UniToStr(Item)) + List.append(Item) return List environ = os.environ -- cgit v1.2.3