]> git.lyx.org Git - lyx.git/commitdiff
Writing code in the presence of preprocessing blocks can be tricky.
authorAngus Leeming <leeming@lyx.org>
Sun, 16 Jan 2005 16:53:08 +0000 (16:53 +0000)
committerAngus Leeming <leeming@lyx.org>
Sun, 16 Jan 2005 16:53:08 +0000 (16:53 +0000)
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
src/support/filetools.C

index dfed66dc6b78fd0bfd75f993da1a72714e29a95e..2a4eec4dc81775b57b4a61a6737a8486132ea2c1 100644 (file)
@@ -1,3 +1,8 @@
+2005-01-16  Angus Leeming  <leeming@lyx.org>
+
+       * filetools.C (createLyXTmpDir): add some missing brackets to the
+       if-block. OS/2 users will be happier.
+
 2005-01-02  Kayvan Sylvan  <kayvan@sylvan.com>
 
        * os_win32.C (external_path): Check the new cygwin_path_fix_ bool
index d5a09c4798c0d0455932d73fa59c9f7de6d0753b..72303c6d5f7920eb945f99a6e408d9b7ed48a3d0 100644 (file)
@@ -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 {