Hello Ryan, Ludovic Courtès skribis: >> ((final-path . (? string? file-name)) >> - (mlet %store-monad ((file (interned-file file-name >> + (mlet %store-monad ((file (interned-file (canonicalize-path file-name) >> (basename final-path)))) > > Instead of calling ‘canonicalize-path’, which leads to many syscalls, > I’d suggest: > > (interned-file file-name (basename final-path) > #:recursive? #f) It was missing one bit; attached is an version of it that works. I chose ‘readlink*’ because it’s less expensive that ‘canonicalize-path’: only one extra syscall (readlink) when ‘file-name’ is already a regular file. For the record, I stumbled upon this bug just today while working on : the "imported-files does not create symlinks" in ‘tests/gexp.scm’ would fail when running in an isolated environment because file “x” would be a symlink to a file outside the store. Ludo’.