From 555bd9e4d827c9e1b4a90a5953a8e311a21c79dc Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Sun, 16 Jan 2005 16:53:08 +0000 Subject: [PATCH] Writing code in the presence of preprocessing blocks can be tricky. Add some brackets to an if-block to ensure that the code does what is expected of it. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9482 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/ChangeLog | 5 +++++ src/support/filetools.C | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/support/ChangeLog b/src/support/ChangeLog index dfed66dc6b..2a4eec4dc8 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,8 @@ +2005-01-16 Angus Leeming + + * filetools.C (createLyXTmpDir): add some missing brackets to the + if-block. OS/2 users will be happier. + 2005-01-02 Kayvan Sylvan * os_win32.C (external_path): Check the new cygwin_path_fix_ bool diff --git a/src/support/filetools.C b/src/support/filetools.C index d5a09c4798..72303c6d5f 100644 --- a/src/support/filetools.C +++ b/src/support/filetools.C @@ -581,7 +581,7 @@ string const createLyXTmpDir(string const & deflt) { if (!deflt.empty() && deflt != "/tmp") { if (mkdir(deflt, 0777)) { - if (IsDirWriteable(deflt)) + if (IsDirWriteable(deflt)) { // deflt could not be created because it // did exist already, so let's create our own // dir inside deflt. @@ -589,12 +589,13 @@ string const createLyXTmpDir(string const & deflt) Path p(user_lyxdir()); #endif return createTmpDir(deflt, "lyx_tmpdir"); - else + } else { // some other error occured. #ifdef __EMX__ Path p(user_lyxdir()); #endif return createTmpDir("/tmp", "lyx_tmpdir"); + } } else return deflt; } else { -- 2.39.2