Browse Source

Merge pull request #10 from mseker-issd/patch-1

Conditionally compile access to long name member of file structure.
pull/11/head
Philipp Tölke 8 years ago
committed by GitHub
parent
commit
c90c17b305
  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