]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dbox: dbox_cleanup_temp_files() - Reformat code
authorMarco Bettini <marco.bettini@open-xchange.com>
Tue, 28 Feb 2023 11:45:43 +0000 (11:45 +0000)
committermarkus.valentin <markus.valentin@open-xchange.com>
Fri, 10 Mar 2023 10:51:41 +0000 (10:51 +0000)
src/lib-storage/index/dbox-common/dbox-storage.c

index 498c2cee75a24af1a378a521166dd419e21e4dae..ae0e2e3cde20cb0368e0cb63a4828650a307239c 100644 (file)
@@ -194,7 +194,6 @@ dbox_cleanup_temp_files(struct mailbox *box, const char *path,
        if (last_change_time == (time_t)-1) {
                /* Don't know the ctime yet - look it up. */
                struct stat st;
-
                if (stat(path, &st) < 0) {
                        if (errno != ENOENT)
                                e_error(box->event,
@@ -204,6 +203,7 @@ dbox_cleanup_temp_files(struct mailbox *box, const char *path,
                last_change_time = st.st_ctime;
                stated = TRUE;
        }
+
        if (last_scan_time > last_change_time + DBOX_TMP_DELETE_SECS) {
                /* there haven't been any changes to this directory
                   since we last checked it. If we did an extra stat(),
@@ -211,10 +211,9 @@ dbox_cleanup_temp_files(struct mailbox *box, const char *path,
                   stat()ing the next time. */
                return stated;
        }
-       const char *prefix =
-               mailbox_list_get_global_temp_prefix(box->list);
-       (void)unlink_old_files(path, prefix,
-                               ioloop_time - DBOX_TMP_DELETE_SECS);
+
+       const char *prefix = mailbox_list_get_global_temp_prefix(box->list);
+       (void)unlink_old_files(path, prefix, ioloop_time - DBOX_TMP_DELETE_SECS);
        return TRUE;
 }