summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/common/dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/common/dir.c b/firmware/common/dir.c
index 88dbe29c80..00e3ade37d 100644
--- a/firmware/common/dir.c
+++ b/firmware/common/dir.c
@@ -49,10 +49,10 @@ static int strip_volume(const char* name, char* namecopy)
49 int volume = 0; 49 int volume = 0;
50 const char *temp = name; 50 const char *temp = name;
51 51
52 while (*temp && strchr("/", *temp)) /* skip all leading slashes */ 52 while (*temp == '/') /* skip all leading slashes */
53 ++temp; 53 ++temp;
54 54
55 if (*temp && !strncmp(temp, vol_names, VOL_ENUM_POS)) 55 if (*temp && !strncmp(temp, vol_names, VOL_ENUM_POS))
56 { 56 {
57 temp += VOL_ENUM_POS; /* behind special name */ 57 temp += VOL_ENUM_POS; /* behind special name */
58 volume = atoi(temp); /* number is following */ 58 volume = atoi(temp); /* number is following */