deduplication: Use 'dynamic-wind' when changing permissions of the parent.
authorLudovic Courtès <ludo@gnu.org>
Thu, 25 Jun 2020 08:10:09 +0000 (10:10 +0200)
committerLudovic Courtès <ludo@gnu.org>
Thu, 25 Jun 2020 10:29:22 +0000 (12:29 +0200)
commitd52e16d3b68b4f5e748b4d6014d4a9c207266ade
tree545b4d2656081a1d0fe8e1d1f0fad49740cd7fbb
parentb930f0ba2115f71c323d4bf3d72efb763f716296
deduplication: Use 'dynamic-wind' when changing permissions of the parent.

Suggested by Caleb Ristvedt <caleb.ristvedt@cune.org>.

* guix/store/deduplication.scm (call-with-writable-file): New procedure.
(with-writable-file): New macro.
(replace-with-link): Use it.
.dir-locals.el
guix/store/deduplication.scm