summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-04-22 06:53:43 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-04-22 06:53:43 -0700
commitca34937d301d52c18a7a21a1081ac0c2eb7d8ce6 (patch)
treeaf0e2c241acd4495a831a9a3c53cbfc7319dd15f
parenta65c642d2c89bbddf755ee825f23a8a620c5d9cb (diff)
downloadtxr-ca34937d301d52c18a7a21a1081ac0c2eb7d8ce6.tar.gz
txr-ca34937d301d52c18a7a21a1081ac0c2eb7d8ce6.tar.bz2
txr-ca34937d301d52c18a7a21a1081ac0c2eb7d8ce6.zip
tags: bugfix: file-opening logic in simulated load.
* tags.tl (fake-load): When the file doesn't end in .tl, we are only trying it with the .tl suffix, without falling back on the original name. And we are doing that in an ignerr, so the nil object will be used as a stream. This cause stdin to be read when the function encounters a dangling symlink.
-rwxr-xr-xtags.tl3
1 files changed, 2 insertions, 1 deletions
diff --git a/tags.tl b/tags.tl
index 2f76ab0e..44f2fad5 100755
--- a/tags.tl
+++ b/tags.tl
@@ -100,7 +100,8 @@
(let ((*fake-load-path* path)
(stream (if (ends-with ".tl" path)
(open-file path)
- (or (ignerr (open-file `@path.tl`))))))
+ (or (ignerr (open-file `@path.tl`))
+ (open-file path)))))
(whilet ((obj (read stream *stderr* err-ret path))
((neq obj err-ret)))
(when (consp obj)