mirror of
https://github.com/TomHarte/CLK.git
synced 2024-09-29 16:55:59 +00:00
Ignore hidden files.
This commit is contained in:
parent
b41e29a83b
commit
813e252539
@ -48,9 +48,10 @@ Analyser::Static::TargetList Analyser::Static::Enterprise::GetTargets(const Medi
|
|||||||
auto volume = Storage::Disk::FAT::GetVolume(media.disks.front());
|
auto volume = Storage::Disk::FAT::GetVolume(media.disks.front());
|
||||||
if(volume) {
|
if(volume) {
|
||||||
// If there's an EXDOS.INI then this disk should be able to boot itself.
|
// If there's an EXDOS.INI then this disk should be able to boot itself.
|
||||||
// If not but if there's only one .COM or .BAS, automatically load that.
|
// If not but if there's only one visible .COM or .BAS, automatically load
|
||||||
// Failing that, issue a :DIR and give the user a clue as to how to load.
|
// that. Otherwise, issue a :DIR.
|
||||||
const Storage::Disk::FAT::File *selected_file = nullptr;
|
using File = Storage::Disk::FAT::File;
|
||||||
|
const File *selected_file = nullptr;
|
||||||
bool has_exdos_ini = false;
|
bool has_exdos_ini = false;
|
||||||
bool did_pick_file = false;
|
bool did_pick_file = false;
|
||||||
for(const auto &file: (*volume).root_directory) {
|
for(const auto &file: (*volume).root_directory) {
|
||||||
@ -59,7 +60,9 @@ Analyser::Static::TargetList Analyser::Static::Enterprise::GetTargets(const Medi
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(insensitive_equal(file.extension, "com") || insensitive_equal(file.extension, "bas")) {
|
if(!(file.attributes & File::Attribute::Hidden) &&
|
||||||
|
(insensitive_equal(file.extension, "com") || insensitive_equal(file.extension, "bas"))
|
||||||
|
) {
|
||||||
did_pick_file = !selected_file;
|
did_pick_file = !selected_file;
|
||||||
selected_file = &file;
|
selected_file = &file;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user