]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/butil.c
Replace explicit checks for "/" with calls to IsPathSeparator, strchr with first_path...
[bacula/bacula] / bacula / src / stored / butil.c
index 43a8088a8f909425cd9c8dacddb39afc687db04c..f2817562483589a58b88efcff641473663a65cab 100644 (file)
@@ -140,9 +140,9 @@ static DCR *setup_to_access_device(JCR *jcr, char *dev_name,
          /* Try stripping file part */
          p = dev_name + strlen(dev_name);
 
-         while (p >= dev_name && *p != '/')
+         while (p >= dev_name && !IsPathSeparator(*p))
             p--;
-         if (*p == '/') {
+         if (IsPathSeparator(*p)) {
             bstrncpy(VolName, p+1, sizeof(VolName));
             *p = 0;
          }