+extern void detect_atomic_leftover(char * path)
+{
+ char * f_name = "detect_atomic_leftover()";
+ char * path_tmp = build_temp_path(path);
+ char * part1 = "Found file '";
+ char * part2 = "' that may be a leftover from an aborted previous attempt "
+ "to write '";
+ char * part3 = "'. Aborting until the matter is solved by (re-)moving it.";
+ uint32_t size = strlen(part1) + strlen(path_tmp) + strlen(part2)
+ + strlen(path) + strlen(part3) + 1;
+ char * msg = try_malloc(size, f_name);
+ int test = sprintf(msg, "%s%s%s%s%s", part1, path_tmp, part2, path, part3);
+ exit_trouble(test < 0, f_name, "sprintf()");
+ exit_err(!access(path_tmp, F_OK), msg);
+ free(msg);
+ free(path_tmp);
+}
+
+
+