projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d763794
)
Forward-port FTP fix from 1.x.
author
Carl Hetherington
<cth@carlh.net>
Mon, 12 Jan 2015 11:54:33 +0000
(11:54 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Mon, 12 Jan 2015 11:54:33 +0000
(11:54 +0000)
src/lib/internet.cc
patch
|
blob
|
history
diff --git
a/src/lib/internet.cc
b/src/lib/internet.cc
index b45eaabf7580ec2c74a0d0559d3b0ed54b377223..b4395fd212c732b3d66da2cb00f07bad34e77dd2 100644
(file)
--- a/
src/lib/internet.cc
+++ b/
src/lib/internet.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014
-2015
Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-21,6
+21,7
@@
#include <boost/function.hpp>
#include <boost/optional.hpp>
#include <boost/filesystem.hpp>
#include <boost/function.hpp>
#include <boost/optional.hpp>
#include <boost/filesystem.hpp>
+#include <boost/algorithm/string.hpp>
#include <curl/curl.h>
#include <zip.h>
#include "scoped_temporary.h"
#include <curl/curl.h>
#include <zip.h>
#include "scoped_temporary.h"
@@
-33,6
+34,7
@@
using std::string;
using std::list;
using boost::optional;
using boost::function;
using std::list;
using boost::optional;
using boost::function;
+using boost::algorithm::trim;
static size_t
get_from_zip_url_data (void* buffer, size_t size, size_t nmemb, void* stream)
static size_t
get_from_zip_url_data (void* buffer, size_t size, size_t nmemb, void* stream)
@@
-138,7
+140,8
@@
ftp_ls (string url)
SafeStringStream s (ls_raw);
list<string> ls;
while (s.good ()) {
SafeStringStream s (ls_raw);
list<string> ls;
while (s.good ()) {
- string const line = s.getline ();
+ string line = s.getline ();
+ trim (line);
if (line.length() > 55) {
string const file = line.substr (55);
if (file != "." && file != "..") {
if (line.length() > 55) {
string const file = line.substr (55);
if (file != "." && file != "..") {