From fd8e0d71b89c5bb2e079a3535e825442fc54ddab Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Wed, 22 Oct 2003 20:39:30 +0000 Subject: [PATCH] Add a warning message if the file to contain the conversion script cannot be opened. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7957 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/graphics/ChangeLog | 5 +++++ src/graphics/GraphicsConverter.C | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/graphics/ChangeLog b/src/graphics/ChangeLog index f035f32508..150bdfbb6f 100644 --- a/src/graphics/ChangeLog +++ b/src/graphics/ChangeLog @@ -1,3 +1,8 @@ +2003-10-22 Angus Leeming + + * 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 * PreviewLoader.C (startLoading): do nothing if the buffer is not yet diff --git a/src/graphics/GraphicsConverter.C b/src/graphics/GraphicsConverter.C index 0f54fb57de..dc9c5d0b73 100644 --- a/src/graphics/GraphicsConverter.C +++ b/src/graphics/GraphicsConverter.C @@ -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(); -- 2.39.2