mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-05 12:25:03 +02:00
fix fatfs_create_spiflash_image() feature (IDFGH-6383)
Open the files in binary mode, and remove the redundant encode
This commit is contained in:
@@ -167,7 +167,7 @@ class FATFS:
|
||||
normal_path = os.path.normpath(folder_relative_path)
|
||||
split_path = normal_path.split(os.sep)
|
||||
if os.path.isfile(real_path):
|
||||
with open(real_path) as file:
|
||||
with open(real_path, "rb") as file:
|
||||
content = file.read()
|
||||
file_name, extension = os.path.splitext(split_path[-1])
|
||||
extension = extension[1:] # remove the dot from the extension
|
||||
|
||||
Reference in New Issue
Block a user