| 1307 | |
| 1308 | #ifdef CHDIR |
| 1309 | void |
| 1310 | chdirx(const char *dir, boolean wr) |
| 1311 | { |
| 1312 | static char thisdir[] = "."; |
| 1313 | |
| 1314 | if (dir && chdir(dir) < 0) { |
| 1315 | error("Cannot chdir to %s.", dir); |
| 1316 | } |
| 1317 | |
| 1318 | /* warn the player if we can't write the record file */ |
| 1319 | /* perhaps we should also test whether . is writable */ |
| 1320 | /* unfortunately the access system-call is worthless */ |
| 1321 | if (wr) |
| 1322 | check_recordfile(dir ? dir : thisdir); |
| 1323 | } |
| 1324 | #endif /* CHDIR */ |
| 1325 | |
| 1326 | void |
no test coverage detected