summaryrefslogtreecommitdiff
path: root/scripts/gui/sclip
diff options
context:
space:
mode:
authorSuleyman Farajli <suleyman@farajli.net>2025-11-25 23:10:56 +0400
committerSuleyman Farajli <suleyman@farajli.net>2025-11-25 23:10:56 +0400
commita0c21b0a59c2fdc3e23ba54ff4a94fd5c57831ae (patch)
treef96a231371180cc2eeaf2545e743d2878d899025 /scripts/gui/sclip
parent7a3f76e663a5e2b2b0f94e1c73926eb52a4896ab (diff)
fix(sclip): check whether the path is a file
Diffstat (limited to 'scripts/gui/sclip')
-rwxr-xr-xscripts/gui/sclip5
1 files changed, 4 insertions, 1 deletions
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 ;;