termux/game-packages

nethack save folder missing

tty4242 opened this issue · 2 comments

nethack version 3.6.6-1

The folder for saving game records ($PREFIX/games/lib/nethackdir/save) is not created by apt/dpkg during installation, as a result of which, nethack fails to save the game (it doesn't create the folder on it's own, but is able to save if the folder is created manually).

Steps to reproduce:

  1. Install and run nethack.
  2. Start a random game, and press Shift+S to save and exit.
  3. Nethack displays the error message "Saving... Cannot open file." in the top left (dismiss by pressing ESC).

Proposed solution:

  1. Have the apt/dpkg package contain the mentioned save folder so that nethack can save records without manually creating the folder (useful for players who don't know how to fix this).

Maybe apend the following line to build.sh ?

mkdir -p $TERMUX_PREFIX/games/nethackdir/save

Hi, thanks!

I added a mkdir step in a postinst script, empty directories are removed by our build script: https://github.com/termux/termux-packages/blob/225d1edc1106ce9bee3b1cef99e75a319958b7cf/scripts/build/termux_step_massage.sh#L67