R0.15 patch 3

August 15, 2023

f_setlabel function fails when set a volume label in Unix style volume ID.

This problem was reported via an email.
This commit is contained in:
Christopher Williams
2023-08-16 17:35:03 -07:00
parent 010b83715f
commit b11f089319
+5 -1
View File
@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------/
/ FatFs - Generic FAT Filesystem Module R0.15 w/patch2 /
/ FatFs - Generic FAT Filesystem Module R0.15 w/patch3 /
/-----------------------------------------------------------------------------/
/
/ Copyright (C) 2022, ChaN, all right reserved.
@@ -5462,6 +5462,10 @@ FRESULT f_setlabel (
/* Get logical drive */
res = mount_volume(&label, &fs, FA_WRITE);
if (res != FR_OK) LEAVE_FF(fs, res);
#if FF_STR_VOLUME_ID == 2
for ( ; *label == '/'; label++) ; /* Snip the separators off */
#endif
#if FF_FS_EXFAT
if (fs->fs_type == FS_EXFAT) { /* On the exFAT volume */