#1034687 ardentryst: Crash when renaming existing character

#1034687#5
Date:
2023-04-21 18:17:39 UTC
From:
To:
Dear Maintainer,

when resuming a saved game you can press “Q” in the world map/overview.
You then get a menu in which you can press “R” to rename the character.
Pressing “return” after typing the new character name crashes the game.

The following text is the entire terminal output from start to a crash:

pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Ext.reader.Sax2 not found
-------------------------------------------------------------------------------
            Ardentryst v.20090726 (1.71-Comet Unstable) 1:11 PM AEST
                               by Jordan Trudgett
-------------------------------------------------------------------------------

    Ardentryst Copyright (C) 2007, 2008, 2009 Jordan Trudgett
    This program comes with ABSOLUTELY NO WARRANTY.
    This is free software, and you are welcome to redistribute it
    under certain conditions; for details, see the COPYING file.

An error has occurred.
Traceback (most recent call last):
  File "/usr/share/games/ardentryst/ardentryst.py", line 4722, in <module>
    main()
  File "/usr/share/games/ardentryst/ardentryst.py", line 4423, in main
    handle_game(Game, True)
  File "/usr/share/games/ardentryst/ardentryst.py", line 2988, in handle_game
    r = Ingame_Menu((screen, Data, Fonts, p1c, soundbox, ticker, Game, player, False))
  File "/usr/share/games/ardentryst/play_level.py", line 1588, in Ingame_Menu
    sfiles = os.listdir("Saves")
FileNotFoundError: [Errno 2] No such file or directory: 'Saves'
Traceback (most recent call last):
  File "/usr/share/games/ardentryst/ardentryst.py", line 4722, in <module>
    main()
  File "/usr/share/games/ardentryst/ardentryst.py", line 4423, in main
    handle_game(Game, True)
  File "/usr/share/games/ardentryst/ardentryst.py", line 2988, in handle_game
    r = Ingame_Menu((screen, Data, Fonts, p1c, soundbox, ticker, Game, player, False))
  File "/usr/share/games/ardentryst/play_level.py", line 1588, in Ingame_Menu
    sfiles = os.listdir("Saves")
FileNotFoundError: [Errno 2] No such file or directory: 'Saves'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/games/ardentryst/ardentryst.py", line 4726, in <module>
    handleException(e)
  File "/usr/share/games/ardentryst/ardentryst.py", line 685, in handleException
    open("bugreport.txt", "w").write(open(os.path.join(SAVEDIRECTORY, "log.txt"), "r").read())
PermissionError: [Errno 13] Permission denied: 'bugreport.txt'