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 39dfaf5c0b073b66e4df131a3e4981f30f9d6395..82a00f4641d353ef9bae194cf70da595999795ab 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 == "..") {
                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 ();
                                        result /= *i;
                                } else {
                                        result = result.parent_path ();