]> git.lyx.org Git - features.git/commitdiff
Add a warning message if the file to contain the conversion script
authorAngus Leeming <leeming@lyx.org>
Wed, 22 Oct 2003 20:39:30 +0000 (20:39 +0000)
committerAngus Leeming <leeming@lyx.org>
Wed, 22 Oct 2003 20:39:30 +0000 (20:39 +0000)
cannot be opened.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7957 a592a061-630c-0410-9148-cb99ea01b6c8

src/graphics/ChangeLog
src/graphics/GraphicsConverter.C

index f035f325080e941ef472ec0216d3b457daa37cd9..150bdfbb6f45edb973b0caf3d104dbd99ba9ff34 100644 (file)
@@ -1,3 +1,8 @@
+2003-10-22  Angus Leeming  <leeming@lyx.org>
+
+       * GraphicsConverter.C (Impl c-tor): add a warning message if the file
+       to contain the conversion script cannot be opened.
+
 2003-10-22  Angus Leeming  <leeming@lyx.org>
 
        * PreviewLoader.C (startLoading): do nothing if the buffer is not yet
index 0f54fb57de45690e770326fe6517e19dd7d24f75..dc9c5d0b73c23006c2bb2b39b049591395d326fa 100644 (file)
@@ -187,8 +187,13 @@ Converter::Impl::Impl(string const & from_file,   string const & to_file_base,
                        tostr(counter++) + ".sh";
 
                std::ofstream fs(script_file_.c_str());
-               if (!fs.good())
+               if (!fs.good()) {
+                       lyxerr << "Unable to write the conversion script to \""
+                              << script_file_ << '\n'
+                              << "Please check your directory permissions."
+                              << std::endl;
                        return;
+               }
 
                fs << script.str();
                fs.close();