Merge branch 'content-rework-take5' of /home/carl/git/dvdomatic into content-rework...
[dcpomatic.git] / src / lib / job.cc
index 2a4986f0ddc23cd18c0998a890aac70fc6a28680..812380594ec0ea247661951d93909773fbce2201 100644 (file)
@@ -68,11 +68,15 @@ Job::run_wrapper ()
                set_state (FINISHED_ERROR);
                
                string m = String::compose (_("An error occurred whilst handling the file %1."), boost::filesystem::path (e.filename()).leaf());
-               
-               boost::filesystem::space_info const s = boost::filesystem::space (e.filename());
-               if (s.available < pow (1024, 3)) {
-                       m += N_("\n\n");
-                       m += _("The drive that the film is stored on is low in disc space.  Free some more space and try again.");
+
+               try {
+                       boost::filesystem::space_info const s = boost::filesystem::space (e.filename());
+                       if (s.available < pow (1024, 3)) {
+                               m += N_("\n\n");
+                               m += _("The drive that the film is stored on is low in disc space.  Free some more space and try again.");
+                       }
+               } catch (...) {
+
                }
 
                set_error (e.what(), m);