Skip to content
Snippets Groups Projects
Commit 4d61cf9d authored by Peter W. Draper's avatar Peter W. Draper
Browse files

We also require that directories can be searched, so make that explicit

This is a requirement of fopen()
parent f0639090
No related branches found
No related tags found
1 merge request!368Check if snapshot directory exists and add a digit to the output
......@@ -387,11 +387,12 @@ int main(int argc, char *argv[]) {
#endif
/* Check that we can write the snapshots by testing if the output
* directory exists and is writable. */
* directory exists and is searchable and writable. */
char basename[PARSER_MAX_LINE_SIZE];
parser_get_param_string(params, "Snapshots:basename", basename);
const char *dirp = dirname(basename);
if (access(dirp, W_OK) != 0) {
message("dirp = %s", dirp);
if (access(dirp, W_OK|X_OK) != 0) {
error("Cannot write snapshots in directory %s (%s)", dirp,
strerror(errno));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment