summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-05-01 13:33:23 +0100
committerCarl Hetherington <cth@carlh.net>2015-05-01 13:33:23 +0100
commit7258a88930092beffa14afeb581a61985c72fd3d (patch)
tree166227e335c2bc9e293e9678317c3c9bf4438b99
parent1366fd9bc68e92f1a5637c570f15e975fac9fd05 (diff)
f45b53e8f5d13f3dd3eecd14bfd44a12fb788d4e from master; ignore ._ files.
-rw-r--r--ChangeLog5
-rw-r--r--TO_PORT1
-rw-r--r--src/lib/image_content.cc2
-rw-r--r--src/lib/util.cc4
4 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9b736b1f9..8a255946a 100644
--- 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 f331be557..e69de29bb 100644
--- a/TO_PORT
+++ b/TO_PORT
@@ -1 +0,0 @@
-e09c8e97be9fb4183edc3fe7424d7db3443cccd2
diff --git a/src/lib/image_content.cc b/src/lib/image_content.cc
index a9cb148c2..f9a772e00 100644
--- a/src/lib/image_content.cc
+++ b/src/lib/image_content.cc
@@ -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;
diff --git a/src/lib/util.cc b/src/lib/util.cc
index f98e5960b..22baa8fd3 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -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 (