Hi,

Maxime Devos <maximede...@telenet.be> skribis:

> Maybe replace
>
>    (symlink target pivot)
>
> by (symlink/remove-old target pivot)
>
> where
>
> (define (symlink/remove-old target link)
>   "Make a symbolic link named LINK pointing to TARGET.
> If LINK already exists, it will be removed first.
> This is not an atomic operation."
>   (catch 'system-error
>     (lambda ()
>       (symlink target link))
>     (lambda stuff
>       (if (= (system-error-errno stuff) EEXIST)
>           (begin
>             ;; remove old link and retry
>             (delete-file link)
>             (symlink/remove-old link target))
>           (apply throw stuff)))))

Alright, SGTM (this procedure would be kept private).

So Arun, the floor is yours!  :-)

Ludo’.

Reply via email to