X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fdatabase.cc;h=79eb3d6977343e50e15e12746ac33ac01f505c28;hp=8f0e22a834eeb3e851577c2a97b3de4ddebf7202;hb=cec4a87539599e7d253b694c2a0a81de86d6eb7e;hpb=49d4f52f270773f86c90eb1c50805d1d7429d39b diff --git a/lib/database.cc b/lib/database.cc index 8f0e22a8..79eb3d69 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -858,8 +858,7 @@ notmuch_database_open_verbose (const char *path, notmuch->status_string = NULL; notmuch->path = talloc_strdup (notmuch, path); - if (notmuch->path[strlen (notmuch->path) - 1] == '/') - notmuch->path[strlen (notmuch->path) - 1] = '\0'; + strip_trailing(notmuch->path, '/'); notmuch->mode = mode; notmuch->atomic_nesting = 0;