/* 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;
}