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
This commit is contained in:
Angus Leeming 2005-01-16 16:53:08 +00:00
parent 49cc508422
commit 555bd9e4d8
2 changed files with 8 additions and 2 deletions

View 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> 2005-01-02 Kayvan Sylvan <kayvan@sylvan.com>
* os_win32.C (external_path): Check the new cygwin_path_fix_ bool * os_win32.C (external_path): Check the new cygwin_path_fix_ bool

View File

@ -581,7 +581,7 @@ string const createLyXTmpDir(string const & deflt)
{ {
if (!deflt.empty() && deflt != "/tmp") { if (!deflt.empty() && deflt != "/tmp") {
if (mkdir(deflt, 0777)) { if (mkdir(deflt, 0777)) {
if (IsDirWriteable(deflt)) if (IsDirWriteable(deflt)) {
// deflt could not be created because it // deflt could not be created because it
// did exist already, so let's create our own // did exist already, so let's create our own
// dir inside deflt. // dir inside deflt.
@ -589,12 +589,13 @@ string const createLyXTmpDir(string const & deflt)
Path p(user_lyxdir()); Path p(user_lyxdir());
#endif #endif
return createTmpDir(deflt, "lyx_tmpdir"); return createTmpDir(deflt, "lyx_tmpdir");
else } else {
// some other error occured. // some other error occured.
#ifdef __EMX__ #ifdef __EMX__
Path p(user_lyxdir()); Path p(user_lyxdir());
#endif #endif
return createTmpDir("/tmp", "lyx_tmpdir"); return createTmpDir("/tmp", "lyx_tmpdir");
}
} else } else
return deflt; return deflt;
} else { } else {