- err = stat (dot_notmuch_path, &st);
- if (err) {
- if (errno == ENOENT) {
- dot_notmuch_path = NULL;
- } else {
- fprintf (stderr, "Failed to stat %s: %s\n", dot_notmuch_path, strerror (errno));
- return EXIT_FAILURE;
- }
+ err = mkdir (backup_dir, 0755);
+ if (err && errno != EEXIST) {
+ fprintf (stderr, "Failed to create %s: %s\n", backup_dir, strerror (errno));
+ return EXIT_FAILURE;