diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-09-23 22:32:26 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-09-23 22:32:26 +0100 |
| commit | e72351201130c4523dc1420dd64bc2bc3be213d8 (patch) | |
| tree | 25857781098b517f3a0cebecb88b2bdc31e53a53 /src | |
| parent | d4168894a231253d2625a7c1f7b4df68c9c8557c (diff) | |
Ignore windows line endings when reading metadata on Linux.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/film.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc index 022cc4f5b..d1334130e 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -123,6 +123,10 @@ Film::read_metadata () continue; } + if (line[line.size() - 1] == '\r') { + line = line.substr (0, line.size() - 1); + } + size_t const s = line.find (' '); if (s == string::npos) { continue; |
