Try to ignore exceptions thrown from boost::filesystem::is_symlink (#1662).
authorCarl Hetherington <cth@carlh.net>
Wed, 6 Nov 2019 12:48:17 +0000 (13:48 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 6 Nov 2019 12:48:37 +0000 (13:48 +0100)
src/lib/film.cc

index 39dfaf5..82a00f4 100644 (file)
@@ -180,7 +180,8 @@ Film::Film (optional<boost::filesystem::path> dir)
                boost::filesystem::path result;
                for (boost::filesystem::path::iterator i = p.begin(); i != p.end(); ++i) {
                        if (*i == "..") {
-                               if (boost::filesystem::is_symlink (result) || result.filename() == "..") {
+                               boost::system::error_code ec;
+                               if (boost::filesystem::is_symlink(result, ec) || result.filename() == "..") {
                                        result /= *i;
                                } else {
                                        result = result.parent_path ();