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
This commit is contained in:
Angus Leeming 2003-10-22 20:39:30 +00:00
parent aec5a388c8
commit fd8e0d71b8
2 changed files with 11 additions and 1 deletions

View 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

View 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();