Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System Volume Information folder being displayed #38

Closed
LittleGem opened this issue Dec 20, 2017 · 5 comments
Closed

System Volume Information folder being displayed #38

LittleGem opened this issue Dec 20, 2017 · 5 comments

Comments

@LittleGem
Copy link

Hi,

Probably covered before (if so then please ignore).

The System Volume Information folder is added every time a USB file system is touched by Windows. This folder redundantly appears in the FlashFloppy display.

Perhaps it could be simply filtered out?

Sample code ...

static bool_t native_dir_next(void)
{
do {
F_readdir(&fs->dp, &fs->fp);
if (fs->fp.fname[0] == '\0')
return FALSE;
/* Skip dot files. /
if (fs->fp.fname[0] == '.')
continue;
/
Skip sys vol directory /
if ((fs->fp.fattrib & AM_DIR) && (strcmp(fs->fp.fname, "System Volume Information") == 0))
continue;
/
Allow folder navigation when LCD/OLED display is attached. */
if ((fs->fp.fattrib & AM_DIR) && (display_mode == DM_LCD_1602)
&& ((cfg.depth != 0) || strcmp(fs->fp.fname, "FF")))
break;
} while (!image_valid(&fs->fp));
return TRUE;
}

@LittleGem LittleGem changed the title Annoying System Volume Information folder being displayed System Volume Information folder being displayed Dec 20, 2017
@keirf
Copy link
Owner

keirf commented Dec 20, 2017

Does the folder have AM_HID set in fs->fp.fattrib? Are you able to test that (have you successfully built the firmware)?

@LittleGem LittleGem reopened this Dec 20, 2017
@LittleGem
Copy link
Author

Will check the attribute setting. Built and tested. Appears to work fine. Had the same issue with another project using fatfs-just filtered the directory from the listing in the same way. Could be made more generic by filtering hidden directories/files (already done? Haven’t checked the code too closely).

@LittleGem
Copy link
Author

Checking the attributes in windows gives SH (system, hidden) as expected.

@keirf
Copy link
Owner

keirf commented Dec 21, 2017

I will fix by filtering all hidden files & folders.

@LittleGem
Copy link
Author

Good call. Best solution.

@keirf keirf closed this as completed in 80e8d5d Jan 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants