]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/findlib/makepath.c
Update doc
[bacula/bacula] / bacula / src / findlib / makepath.c
index bc1fb33989832a95d368f34aa801a4c931492cc6..69ef9c9e97f942989f83567131ebddc606bdadcd 100644 (file)
@@ -135,7 +135,7 @@ make_dir(JCR *jcr, const char *dir, const char *dirpath, mode_t mode, int *creat
 int
 isAbsolute(const char *path)
 {
-#if defined(HAVE_CYGWIN) || defined(WIN32)
+#if defined(HAVE_CYGWIN) || defined(HAVE_WIN32)
     return path[1] == ':' || *path == '/' || *path == '\\';     /* drivespec:/blah is absolute */
 #else
     return *path == '/';
@@ -225,7 +225,7 @@ make_path(
       /* If we've saved the cwd and DIRPATH is an absolute pathname,
          we must chdir to `/' in order to enable the chdir optimization.
          So if chdir ("/") fails, turn off the optimization.  */
-      if (cwd.do_chdir && isAbsolute(dirpath) && chdir ("/") < 0) {
+      if (cwd.do_chdir && isAbsolute(dirpath) && (chdir("/") < 0)) {
         cwd.do_chdir = 0;
       }