From f585a916e65919359886844fa69df3c305632603 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 21 Sep 2010 23:23:58 +0200 Subject: [PATCH] psu_parser: Windows use a different line break convention. --- src/psu/psu_parser.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/psu/psu_parser.erl b/src/psu/psu_parser.erl index 3260d27..b39105f 100644 --- a/src/psu/psu_parser.erl +++ b/src/psu/psu_parser.erl @@ -60,12 +60,12 @@ parse_zone(NblFilename) -> end. nbl_list_files(NblFilename) -> - Cmd = case os:type() of - {win32, nt} -> lists:flatten(io_lib:format("nbl -t ~s", [NblFilename])); - _ -> io_lib:format("./nbl -t ~s", [NblFilename]) + {Cmd, NL} = case os:type() of + {win32, nt} -> {lists:flatten(io_lib:format("nbl -t ~s", [NblFilename])), "\r\n"}; + _ -> {io_lib:format("./nbl -t ~s", [NblFilename]), "\n"} end, StdOut = os:cmd(Cmd), - re:split(StdOut, "\n", [{return, list}]). + re:split(StdOut, NL, [{return, list}]). nbl_extract_files(NblFilename) -> filelib:ensure_dir("tmp/"),