File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 15
15
with open (f"../entries/{ game } /game.json" ) as f :
16
16
game = json .load (f )
17
17
# print(f"Checking {game['slug']}..")
18
+ base_dir = f"{ path } /{ game ['slug' ]} "
19
+
18
20
for file in game ["files" ]:
19
- if file ["filename" ] not in os .listdir (f"{ path } /{ game ['slug' ]} " ):
21
+ full_path = os .path .join (base_dir , file ["filename" ])
22
+ if not os .path .isfile (full_path ):
20
23
raise Exception (
21
24
f'{ file ["filename" ]} found in manifest but not on disk (entry { game ["slug" ]} )'
22
25
)
26
+
23
27
for screenshot in game ["screenshots" ]:
24
- if screenshot not in os .listdir (f"{ path } /{ game ['slug' ]} " ):
28
+ full_path = os .path .join (base_dir , screenshot )
29
+ if not os .path .isfile (full_path ):
25
30
raise Exception (
26
31
f'{ screenshot } found in manifest but not on disk (entry { game ["slug" ]} )'
27
32
)
33
+
28
34
# print(
29
35
# f"{game['slug']}: {len(game['files'])} file(s), {len(game['screenshots'])} screenshot(s)"
30
36
# )
You can’t perform that action at this time.
0 commit comments