diff options
| author | Suleyman Farajli <suleyman@farajli.net> | 2025-11-25 23:10:56 +0400 |
|---|---|---|
| committer | Suleyman Farajli <suleyman@farajli.net> | 2025-11-25 23:10:56 +0400 |
| commit | a0c21b0a59c2fdc3e23ba54ff4a94fd5c57831ae (patch) | |
| tree | f96a231371180cc2eeaf2545e743d2878d899025 /scripts/gui | |
| parent | 7a3f76e663a5e2b2b0f94e1c73926eb52a4896ab (diff) | |
fix(sclip): check whether the path is a file
Diffstat (limited to 'scripts/gui')
| -rwxr-xr-x | scripts/gui/sclip | 5 |
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 ;; |
