Function: majutsu-interactive--safe-relative-path

majutsu-interactive--safe-relative-path is a natively compiled function defined in majutsu-interactive.el.

Signature

(majutsu-interactive--safe-relative-path PATH)

Documentation

Return PATH, or signal a user error if it is unsafe for the helper tool.

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-interactive.el
(defun majutsu-interactive--safe-relative-path (path)
  "Return PATH, or signal a user error if it is unsafe for the helper tool."
  (unless (and (stringp path)
               (not (string-empty-p path))
               (not (file-name-absolute-p path))
               (not (string= path "."))
               (not (string-match-p "\0" path))
               (not (member ".." (split-string path "/" t))))
    (user-error "Unsafe whole-file selection path: %S" path))
  path)