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
commit65531dd765edadeb2fb2a83cf82df4af73100b95 (patch)
treeaf0e2c241acd4495a831a9a3c53cbfc7319dd15f
parent1a0ec42b1227510b05ff0a4f62baced37fc57c71 (diff)
downloadtxr-65531dd765edadeb2fb2a83cf82df4af73100b95.tar.gz
txr-65531dd765edadeb2fb2a83cf82df4af73100b95.tar.bz2
txr-65531dd765edadeb2fb2a83cf82df4af73100b95.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)