Skip to content

Commit

Permalink
pop-fe: do not fail for psp is PSP/GAME/ does not exist
Browse files Browse the repository at this point in the history
This directory will always exist when you point pop-fe to a locally
connected PSP but might not exist for use cases where you just want to
create an EBOOT locally on your haddrive and then later, manually,
copy it to the PSP.

Remove the requirement that PSP/GAME mst exist.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
  • Loading branch information
sahlberg committed Aug 4, 2023
1 parent 73dedd6 commit 0665753
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pop-fe.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,8 +854,15 @@ def create_psp(dest, disc_ids, game_title, icon0, pic0, pic1, cue_files, cu2_fil
pic1.save(i, format='PNG')
i.seek(0)
pic1 = i.read()

f = dest + '/PSP/GAME/' + disc_ids[0]

# Try /PSP/GAME/ if it exists as this is where a PSP memorystick will
# store the games.
try:
os.stat(dest + '/PSP/GAME/')
f = dest + '/PSP/GAME/' + disc_ids[0]
except:
f = dest + '/' + disc_ids[0]

print('Install EBOOT in', f) if verbose else None
try:
os.mkdir(f)
Expand Down

0 comments on commit 0665753

Please sign in to comment.