Summary

delete-file and delete-file* inconsistency

Metadata

Description

While trying to delete an invalid symbolic link file (for which the linked file is deleted), delete-file function succeeds, while delete-file* returns false. I have conducted a research which showed me that file-exists? on such invalid link also returns false, as it calls stat, and, therefore, follows symbolic links. I have prepared a patch which replaces stat with lstat. If that approach is not acceptable, I can try to fix it in a more preferred way.

How to reproduce: $ touch some-file $ ln -s some-file some-link $ rm some-file $ csi -e '(import (chicken file)) (print (file-exists? "some-link"))'

Changes and comments

[2026-01-02 15:22:19 UTC] sjamaan changed status from new to closed

[2026-01-02 15:22:19 UTC] sjamaan set resolution to duplicate

[2026-01-02 15:22:19 UTC] sjamaan wrote:

Dupe of #1863