aboutsummaryrefslogtreecommitdiff
path: root/notmuch-count.c
diff options
context:
space:
mode:
authorJani Nikula <jani@nikula.org>2017-10-01 23:53:10 +0300
committerDavid Bremner <david@tethera.net>2017-10-04 22:00:19 -0300
commitd57da17fcd30a5cbe191ccd42906e489dd2bd6a3 (patch)
tree64b5ec6309eac48b23c076450a3abe1b7a914679 /notmuch-count.c
parent9d48ee2eaacce7323622e6017f7bdb01a915e885 (diff)
cli: strip trailing "/" from the final maildir path in notmuch insert
Several subtle interconnected changes here: - If the folder name passed as argument is the empty string "" or slash "/", the final maildir path would end up having "//" in it. We should strip the final maildir path, not folder. - The folder variable should really be const char *, another reason not to modify it. - The maildir variable is only const to let us point it at db_path directly. To be able to strip the maildir variable, always allocate it. Default folder to the empty string "", and don't treat folder not being present on the command line as anything special. As a side effect, we also create the cur/new/tmp in the top level directory if they're not there and --create-folder is given.
Diffstat (limited to 'notmuch-count.c')
0 files changed, 0 insertions, 0 deletions