It really depends on the system. In Linux for example it is pretty conventional to ask. But, the asking is often done by querying some environment variables.
If a program prompts the user for a directory instead of querying the appropriate environment variable, that is a violation of the stated user preference.
 replies(1):