diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-03-11 20:23:11 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-03-11 21:24:28 +0100 |
| commit | bc36ddea65fda2088f7e8fa98390e3feac07df84 (patch) | |
| tree | fb9b7f9ff44f256a2b740e5c5b97893ca5ece82e /src/lib/film.cc | |
| parent | 755694dd44cf5a012825b8b822da3738461b81ad (diff) | |
Give a better error when opening a DCP with File -> Open by mistake (#1723).
Diffstat (limited to 'src/lib/film.cc')
| -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 90b18ea70..691ef58da 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -475,6 +475,10 @@ Film::read_metadata (optional<boost::filesystem::path> path) path = file (metadata_file); } + if (!boost::filesystem::exists(*path)) { + throw FileNotFoundError(*path); + } + cxml::Document f ("Metadata"); f.read_file (path.get ()); |
