- char cmd[LONG_STRING + _POSIX_PATH_MAX];
- char f[STRING + _POSIX_PATH_MAX];
- char r[STRING];
-
- if (flags & DL_FL_RETRY)
- snprintf (r, sizeof (r), "-r %d ", retry ? MAXLOCKATTEMPT : 0);
-
- mutt_quote_filename (f, sizeof (f), path);
-
- snprintf(cmd, sizeof(cmd), "%s %s%s%s%s%s%s%s",
- mod_core.dotlock,
- flags & DL_FL_TRY ? "-t " : "",
- flags & DL_FL_UNLOCK ? "-u " : "",
- flags & DL_FL_USEPRIV ? "-p " : "",
- flags & DL_FL_FORCE ? "-f " : "",
- flags & DL_FL_UNLINK ? "-d " : "",
- flags & DL_FL_RETRY ? r : "", f);
+ char lockfile[_POSIX_PATH_MAX];
+ snprintf(lockfile, sizeof(lockfile), "%s.lock", path);