Browse Source

Update vfs.c

Hide long filename support variables if LFN is not enabled
pull/10/head
Murat Seker 8 years ago
committed by GitHub
parent
commit
7cbf3e8e63
  1. 4
      vfs.c

4
vfs.c

@ -45,7 +45,9 @@ int vfs_read (void* buffer, int dummy, int len, vfs_file_t* file) {
vfs_dirent_t* vfs_readdir(vfs_dir_t* dir) {
FILINFO fi;
#if _USE_LFN
fi.lfname = NULL;
#endif
FRESULT r = f_readdir(dir, &fi);
if (r != FR_OK) return NULL;
if (fi.fname[0] == 0) return NULL;
@ -55,7 +57,9 @@ vfs_dirent_t* vfs_readdir(vfs_dir_t* dir) {
int vfs_stat(vfs_t* vfs, const char* filename, vfs_stat_t* st) {
FILINFO f;
#if _USE_LFN
f.lfname = NULL;
#endif
if (FR_OK != f_stat(filename, &f)) {
return 1;
}

Loading…
Cancel
Save