Skip to content
Snippets Groups Projects
Commit d380d5d8 authored by mads's avatar mads
Browse files

added unix_filename(filename)

parent 2a71a903
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -13,7 +13,7 @@ from __future__ import absolute_import ...@@ -13,7 +13,7 @@ from __future__ import absolute_import
from io import open from io import open
from builtins import str from builtins import str
from future import standard_library from future import standard_library
from wetb.utils.process_exec import pexec from wetb.utils.process_exec import pexec, unix_filename
standard_library.install_aliases() standard_library.install_aliases()
from collections import OrderedDict from collections import OrderedDict
...@@ -69,7 +69,7 @@ class HTCFile(HTCContents, HTCDefaults): ...@@ -69,7 +69,7 @@ class HTCFile(HTCContents, HTCDefaults):
def readfilelines(self, filename): def readfilelines(self, filename):
with open(filename, encoding='cp1252') as fid: with open(unix_filename(filename), encoding='cp1252') as fid:
lines = list(fid.readlines()) lines = list(fid.readlines())
if lines[0].encode().startswith(b'\xc3\xaf\xc2\xbb\xc2\xbf'): if lines[0].encode().startswith(b'\xc3\xaf\xc2\xbb\xc2\xbf'):
lines[0] = lines[0][3:] lines[0] = lines[0][3:]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment