angband/angband — pull request #185 by lastquestion (2012-08-31 10:25:51+00:00)
Title: Make the command line option -d actually work;

That is, allow command lines to override the locations of any of angband's directories.

Today, the -d option doesn't actually work - it updates ANGBAND_DIR_USER, but that change is clobbered by init_stuff (which calls init_file_paths).

Digging into this, I noticed that the comments for change_path, which is called when -d is parsed, do not line up with the --help text.

This pull request implements -d to match the original comments. In other words, any angband directory, e.g. save/pref/xtra/apex can be overriden to point to an arbitrary directory. -d now also works irregardless of whether PRIVATE_USER_PATH is set (which it is by default, when SET_UID is set, which is set on unix-like OSes).