f45b53e8f5d13f3dd3eecd14bfd44a12fb788d4e from master; ignore ._ files.
authorCarl Hetherington <cth@carlh.net>
Fri, 1 May 2015 12:33:23 +0000 (13:33 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 1 May 2015 12:33:23 +0000 (13:33 +0100)
ChangeLog
TO_PORT
src/lib/image_content.cc
src/lib/util.cc

index 9b736b1f9f2f36038aa6331d0a8fb8f734e6943a..8a255946ae91ef3868035ee0f7ecc8fe1a5cae9c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-01  carl  <cth@carlh.net>
+
+       * Don't load image files whose names start with ._ as they
+       are probably OS X resource files (from master).
+
 2015-04-30  Carl Hetherington  <cth@carlh.net>
 
        * Copy subtitle fonts to the DCP, and provide
diff --git a/TO_PORT b/TO_PORT
index f331be5573206bf8aaec95e25627d8f2dfcb1b01..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
--- a/TO_PORT
+++ b/TO_PORT
@@ -1 +0,0 @@
-e09c8e97be9fb4183edc3fe7424d7db3443cccd2
index a9cb148c2447920a1db51a8964937fc12d8cffa0..f9a772e00126c5d49162442ff68c5559820764bb 100644 (file)
@@ -40,7 +40,7 @@ ImageContent::ImageContent (shared_ptr<const Film> f, boost::filesystem::path p)
        , VideoContent (f)
 {
        bool have_j2k = false;
-       if (boost::filesystem::is_regular_file (p)) {
+       if (boost::filesystem::is_regular_file (p) && valid_image_file (p)) {
                _paths.push_back (p);
                if (valid_j2k_file (p)) {
                        have_j2k = true;
index f98e5960bb20e807f8bf2c9df0c0594a38f54926..22baa8fd3b920482551231df7037281974d60d49 100644 (file)
@@ -509,6 +509,10 @@ audio_channel_name (int c)
 bool
 valid_image_file (boost::filesystem::path f)
 {
+       if (boost::starts_with (f.string(), "._")) {
+               return false;
+       }
+               
        string ext = f.extension().string();
        transform (ext.begin(), ext.end(), ext.begin(), ::tolower);
        return (