reflog: avoid constructing .lock path with git_path
[gitweb.git] / builtin / reflog.c
index 2d85d260ca66deb060b837f86d81a7aad2761b69..fb07c667a87b19a74a5ef0104a1b3cac1e92f7a8 100644 (file)
@@ -372,7 +372,7 @@ static int expire_reflog(const char *ref, const unsigned char *sha1, int unused,
        if (!reflog_exists(ref))
                goto finish;
        if (!cmd->dry_run) {
-               newlog_path = git_pathdup("logs/%s.lock", ref);
+               newlog_path = mkpathdup("%s.lock", log_file);
                cb.newlog = fopen(newlog_path, "w");
        }