diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-21 18:04:13 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-21 18:04:13 +0100 |
| commit | 2a0cec2f51312012302015cb808a1a25c1a6687d (patch) | |
| tree | fb5859137f45b72832346d0f6cf0dfee55319dc2 /src/lib | |
| parent | d750e751d10740c4d2525a7852c384993aba6d41 (diff) | |
Don't report .tmp files as valid thumbs.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/film.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc index 74e5d0bb2..aa0bfa211 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -260,7 +260,7 @@ Film::examine_content_post_gui () string const tdir = dir ("thumbs"); vector<int> thumbs; - + for (filesystem::directory_iterator i = filesystem::directory_iterator (tdir); i != filesystem::directory_iterator(); ++i) { /* Aah, the sweet smell of progress */ @@ -271,7 +271,8 @@ Film::examine_content_post_gui () #endif size_t const d = l.find (".png"); - if (d != string::npos) { + size_t const t = l.find (".tmp"); + if (d != string::npos && t == string::npos) { thumbs.push_back (atoi (l.substr (0, d).c_str())); } } |
