summaryrefslogtreecommitdiffstats
path: root/stdlib/path-test.tl
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/path-test.tl')
-rw-r--r--stdlib/path-test.tl29
1 files changed, 14 insertions, 15 deletions
diff --git a/stdlib/path-test.tl b/stdlib/path-test.tl
index c0b4ea3e..55b5e842 100644
--- a/stdlib/path-test.tl
+++ b/stdlib/path-test.tl
@@ -183,21 +183,20 @@
(defun safe-abs-path (comps)
(flet ((digstr (s) [all s chr-isdigit]))
(let ((safe t))
- (if (zerop (geteuid))
- (when-match ("proc" @(or @(digstr) "self") . @rest)
- (path-simplify comps)
- (match-case rest
- (@(or ("cwd" . @nil)
- ("root" . @nil)
- ("map_files" . @nil)
- ("fd" @(digstr) . @nil))
- (zap safe))
- (("task" @(digstr) . @trest)
- (match-case trest
- (@(or ("cwd" . @nil)
- ("root" . @nil)
- ("fd" @(digstr) . @nil))
- (zap safe)))))))
+ (when-match ("proc" @(or @(digstr) "self") . @rest)
+ (path-simplify comps)
+ (match-case rest
+ (@(or ("cwd" . @nil)
+ ("root" . @nil)
+ ("map_files" . @nil)
+ ("fd" @(digstr) . @nil))
+ (zap safe))
+ (("task" @(digstr) . @trest)
+ (match-case trest
+ (@(or ("cwd" . @nil)
+ ("root" . @nil)
+ ("fd" @(digstr) . @nil))
+ (zap safe))))))
safe)))
(defun path-components-safe (path)