X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Finternet.cc;h=aafdf3a839a342b99944c2c20bdd14a9c9c56b82;hb=1a693725f9a8cc6ba58f65b2f1ef03255d295f23;hp=c0a29bfbdf13cfbc52d93b2e9f1d997fe247832d;hpb=422be0eece2bf6ee80db1d3c21553cd82efff789;p=dcpomatic.git diff --git a/src/lib/internet.cc b/src/lib/internet.cc index c0a29bfbd..aafdf3a83 100644 --- a/src/lib/internet.cc +++ b/src/lib/internet.cc @@ -21,7 +21,6 @@ #include "scoped_temporary.h" #include "compose.hpp" #include "exceptions.h" -#include #include #include #include @@ -74,7 +73,7 @@ get_from_zip_url (string url, string file, bool pasv, function ls; - while (s.good ()) { - string line = s.getline (); - trim (line); - if (line.length() > 55) { - string const file = line.substr (55); - if (file != "." && file != "..") { - ls.push_back (file); + string line; + for (size_t i = 0; i < ls_raw.length(); ++i) { + line += ls_raw[i]; + if (ls_raw[i] == '\n') { + trim (line); + if (line.length() > 55) { + string const file = line.substr (55); + if (file != "." && file != "..") { + ls.push_back (file); + } } + line = ""; } }