Trnasform file name to bytes before opening it to avoid unicode errors if python tries to encode it implicitly

pull/15453/head
Toshio Kuratomi 9 years ago
parent 3014f78bb9
commit e386a51cf8

@ -329,7 +329,7 @@ class DataLoader():
real_path = self.path_dwim(file_path)
try:
with open(real_path, 'rb') as f:
with open(to_bytes(real_path), 'rb') as f:
data = f.read()
if self._vault.is_encrypted(data):
# if the file is encrypted and no password was specified,

Loading…
Cancel
Save