From a0c21b0a59c2fdc3e23ba54ff4a94fd5c57831ae Mon Sep 17 00:00:00 2001 From: Suleyman Farajli Date: Tue, 25 Nov 2025 23:10:56 +0400 Subject: fix(sclip): check whether the path is a file --- scripts/gui/sclip | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts/gui') diff --git a/scripts/gui/sclip b/scripts/gui/sclip index 5b56e4b..dc692f9 100755 --- a/scripts/gui/sclip +++ b/scripts/gui/sclip @@ -27,7 +27,10 @@ read_stdin=0 silent=0 while getopts "f:c:sih" option; do case "${option}" in - f) filepath="${OPTARG}" ;; + f) + filepath="${OPTARG}" + [ -f "${filepath}" ] || err "Not a file" + ;; c) input="${OPTARG}" ;; s) silent=1 ;; i) read_stdin=1 ;; -- cgit v1.2.3