                    (goto-char (point-min))
                    (when (re-search-forward
                           (format "^%s/"
-                                  (regexp-quote local-repo))
+                                  (regexp-quote
+                                   (straight--repos-dir local-repo)))
                           nil 'noerror)
                      (puthash
                       local-repo t straight--cached-package-modifications)))

                         (setq mtime-or-file (straight--make-mtime mtime)))
                        (_ (error "Unexpected `straight-find-flavor': %S"
                                  straight-find-flavor)))
                      (push local-repo args-paths)
                      (setq args-primaries
                            (append (list "-o"
                                          "-path"
                                          (format "%s/*" local-repo)
                                          newer-or-newermt
                                          mtime-or-file
                                          "-print")

                     ;; If no sane repository name can be generated,
                     ;; just use the package name.
                     package)))
              ;; This code is here to deal with complications that can
              ;; arise with manual recipe specifications when multiple
              ;; packages are versioned in the same repository.
