FBT: Only format images in firmware, not ext apps

It was formatting demo screenshots too
There might a better way to detect only icons, but not formatting also means less merge conflicts
This commit is contained in:
Willy-JL
2024-08-12 18:33:09 +02:00
parent c412d00c3a
commit 314554fe3b
3 changed files with 9 additions and 2 deletions
+7 -2
View File
@@ -57,10 +57,15 @@ class ImageLint(App):
def _gather_images(self, folders):
images = []
for folder in folders:
for dirpath, _, filenames in os.walk(folder):
exclude = folder.startswith("!")
for dirpath, _, filenames in os.walk(folder.removeprefix("!")):
for filename in filenames:
if self.is_file_an_icon(filename):
images.append(os.path.join(dirpath, filename))
filepath = os.path.join(dirpath, filename)
if exclude:
images.remove(filepath)
else:
images.append(filepath)
return images
def is_file_an_icon(self, filename):