return 0;
}
+ if (g_filt_trash_dir)
+ {
+ if (0 == grub_strncmp(name, ".trash-", 7) ||
+ 0 == grub_strcmp(name, ".Trashes"))
+ {
+ return 0;
+ }
+ }
+
if (name[0] == '$')
{
if (0 == grub_strncmp(name, "$RECYCLE.BIN", 12) ||
int g_valid_initrd_count = 0;
int g_default_menu_mode = 0;
int g_filt_dot_underscore_file = 0;
+int g_filt_trash_dir = 1;
int g_sort_case_sensitive = 0;
int g_tree_view_menu_style = 0;
static grub_file_t g_old_file;
return 0;
}
- if (filename[0] == '$' && 0 == grub_strncmp(filename, "$RECYCLE.BIN", 12))
+ if (g_filt_trash_dir)
{
- return 0;
+ if (0 == grub_strncmp(filename, ".trash-", 7) ||
+ 0 == grub_strcmp(filename, ".Trashes") ||
+ 0 == grub_strncmp(filename, "$RECYCLE.BIN", 12))
+ {
+ return 0;
+ }
}
if (g_plugin_image_list == VENTOY_IMG_WHITE_LIST)
{
g_filt_dot_underscore_file = 1;
}
+
+ strdata = ventoy_get_env("VTOY_FILT_TRASH_DIR");
+ if (strdata && strdata[0] == '0' && strdata[1] == 0)
+ {
+ g_filt_trash_dir = 0;
+ }
strdata = ventoy_get_env("VTOY_SORT_CASE_SENSITIVE");
if (strdata && strdata[0] == '1' && strdata[1] == 0)
extern int g_sort_case_sensitive;
extern int g_wimboot_enable;
extern int g_filt_dot_underscore_file;
+extern int g_filt_trash_dir;
extern int g_vtoy_file_flt[VTOY_FILE_FLT_BUTT];
extern const char *g_menu_class[img_type_max];
extern char g_iso_path[256];