G7710 and Infineat : close the files after having verified that they exist.
This commit is contained in:
parent
eb0af22ecf
commit
c9e836a02e
2 changed files with 6 additions and 0 deletions
|
@ -340,13 +340,16 @@ bool WatchFaceCasioStyleG7710::IsAvailable(Pinetime::Controllers::FS& filesystem
|
|||
return false;
|
||||
}
|
||||
|
||||
filesystem.FileClose(&file);
|
||||
if (filesystem.FileOpen(&file, "/fonts/7segments_40.bin", LFS_O_RDONLY) < 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
filesystem.FileClose(&file);
|
||||
if (filesystem.FileOpen(&file, "/fonts/7segments_115.bin", LFS_O_RDONLY) < 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
filesystem.FileClose(&file);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -617,13 +617,16 @@ bool WatchFaceInfineat::IsAvailable(Pinetime::Controllers::FS& filesystem) {
|
|||
return false;
|
||||
}
|
||||
|
||||
filesystem.FileClose(&file);
|
||||
if (filesystem.FileOpen(&file, "/fonts/bebas.bin", LFS_O_RDONLY) < 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
filesystem.FileClose(&file);
|
||||
if (filesystem.FileOpen(&file, "/images/pine_small.bin", LFS_O_RDONLY) < 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
filesystem.FileClose(&file);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue