]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/filed/job.c
Replace explicit checks for "/" with calls to IsPathSeparator, strchr with first_path...
[bacula/bacula] / bacula / src / filed / job.c
index 318290700868e2b826f59b0b6b21082542bc2a51..14adba986e11814c135381ed441d51edf2cd5e6e 100644 (file)
@@ -1565,8 +1565,8 @@ static int restore_cmd(JCR *jcr)
       *where = 0;
    }
    /* Turn / into nothing */
-   if (where[0] == '/' && where[1] == 0) {
-      where[0] = 0;
+   if (IsPathSeparator(where[0]) && where[1] == '\0') {
+      where[0] = '\0';
    }
 
    Dmsg2(150, "Got replace %c, where=%s\n", replace, where);