summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/fatfs/src/ff.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/fatfs/src/ff.c')
-rw-r--r--stmhal/fatfs/src/ff.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/stmhal/fatfs/src/ff.c b/stmhal/fatfs/src/ff.c
index 5b0ba240c6..b7d8d27c4d 100644
--- a/stmhal/fatfs/src/ff.c
+++ b/stmhal/fatfs/src/ff.c
@@ -3793,6 +3793,7 @@ FRESULT f_setlabel (
/* Create a volume label in directory form */
vn[0] = 0;
+ if (label[0] == '/') label++;
for (sl = 0; label[sl]; sl++) ; /* Get name length */
for ( ; sl && label[sl-1] == ' '; sl--) ; /* Remove trailing spaces */
if (sl) { /* Create volume label in directory form */