Function: projectile--quarantine-known-projects-file

projectile--quarantine-known-projects-file is a byte-compiled function defined in projectile.el.

Signature

(projectile--quarantine-known-projects-file)

Documentation

Move an unreadable known projects file aside and say so.

Returns non-nil when a file was moved. Overwriting it would throw away whatever it holds, and merging against "nothing" would look exactly like every project having been removed elsewhere - so the file is kept under a .corrupt\= name and the list carries on from memory.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--quarantine-known-projects-file ()
  "Move an unreadable known projects file aside and say so.
Returns non-nil when a file was moved.  Overwriting it would throw away
whatever it holds, and merging against \"nothing\" would look exactly
like every project having been removed elsewhere - so the file is kept
under a `.corrupt\\=' name and the list carries on from memory."
  (let ((file projectile-known-projects-file))
    (when (file-exists-p file)
      (let ((backup (concat file ".corrupt")))
        (ignore-errors (rename-file file backup t))
        (display-warning
         'projectile
         (format "Couldn't read %s, so it was moved to %s.  \
Projectile is carrying on with the projects known to this session; \
the file will be written afresh."
                 file backup)
         :warning)
        t))))