From af7b5b5e26bc77e2a8353bfaa29346d73299c13d Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Mon, 9 Jun 2008 09:57:10 +0000 Subject: [PATCH] More sensible error messages. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25202 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/LyX.cpp | 4 ++-- src/support/filetools.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/LyX.cpp b/src/LyX.cpp index 2c8f766c72..f2462aa44e 100644 --- a/src/LyX.cpp +++ b/src/LyX.cpp @@ -850,8 +850,8 @@ bool LyX::init() if (package().temp_dir().empty()) { Alert::error(_("Could not create temporary directory"), bformat(_("Could not create a temporary directory in\n" - "%1$s. Make sure that this\n" - "path exists and is writable and try again."), + "\"%1$s\"\n" + "Make sure that this path exists and is writable and try again."), from_utf8(lyxrc.tempdir_path))); // createLyXTmpDir() tries sufficiently hard to create a // usable temp dir, so the probability to come here is diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp index 7214668bf7..733911c692 100644 --- a/src/support/filetools.cpp +++ b/src/support/filetools.cpp @@ -321,8 +321,8 @@ static FileName createTmpDir(FileName const & tempdir, string const & mask) LYXERR(Debug::FILES, "createTmpDir: tempdir=`" << tempdir << "'\n" << "createTmpDir: mask=`" << mask << '\''); - FileName const tmpfl = FileName::tempName(tempdir.absFilename() - + "/" + mask); + string const tmp_dir = tempdir.absFilename() + "/" + mask; + FileName const tmpfl = FileName::tempName(tmp_dir); // FileName::tempName actually creates a file to make sure that it // stays unique. So we have to delete it before we can create // a dir with the same name. Note also that we are not thread @@ -330,8 +330,8 @@ static FileName createTmpDir(FileName const & tempdir, string const & mask) tmpfl.removeFile(); if (tmpfl.empty() || !tmpfl.createDirectory(0700)) { - lyxerr << "LyX could not create the temporary directory '" - << tmpfl << "'" << endl; + LYXERR0("LyX could not create the temporary directory '" << tmp_dir + << "'"); return FileName(); }