nethack --showpaths output tweak

Don't display a portable_device_path in --showpaths output if it is
empty or not being used.
This commit is contained in:
nhmall
2021-06-10 12:14:36 -04:00
parent 38d2b3afc2
commit 39a0c5ee38
+5
View File
@@ -4323,9 +4323,14 @@ reveal_paths(void)
if (sysopt.portable_device_paths) { if (sysopt.portable_device_paths) {
const char *pd = get_portable_device(); const char *pd = get_portable_device();
/* an empty value for pd indicates that portable_device_paths
got set TRUE in a sysconf file other than the one containing
the executable; disregard it */
if (strlen(pd) > 0) {
raw_printf("portable_device_paths (set in sysconf):"); raw_printf("portable_device_paths (set in sysconf):");
raw_printf(" \"%s\"", pd); raw_printf(" \"%s\"", pd);
} }
}
#endif #endif
/* personal configuration file */ /* personal configuration file */