You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If given file name which contains braces - An "eval" fails in the betterlockscreen-wrapped with syntax error upon encountering the brace.
If the file name is a string with escaped braces(workaround attempt) - Then other part of betterlockscreen-wrapped fail which seems to expect a non-escaped string.
Steps to reproduce
Run betterlockscreen -u k\(232\).jpg --fx blur or any other file name which contains braces
Expect .betterlockscreen-wrapped: eval: line 467: syntax error near unexpected token (`
The problem is in this eval:
base_resize() {
local input="$1"
local output="$2"
local size="$3"
echof act "Resizing base image..."
convert "$input" \
-resize "$size""^" \
-gravity center \
-extent "$size" \
"$output"
}
(Workaround attempt)
w="k\(232\).jpg"
betterlockscreen -u $w --fx blur
Expect invalid path: k\(232\).jpg
The problem seems to be in this more general earlier code which expects normal non-escaped string.
local path="$1"
# we have a file
if [ -f "$path" ]; then
WALL_LIST+=("$path")
return
# we have a directory
elif [ -d "$path" ]; then
dir=("$path"/*)
rdir="${dir[RANDOM % ${#dir[@]}]}"
get_image "$rdir" # <-- calls itself
# not file or directory, bail out
else
echof err "invalid path: $path"
exit 1
fi
}
Relevant log output
betterlockscreen -u k\(232\).jpg --fx blur
[B] Betterlockscreen
[*] Updating image cache...
[=] Detected 1 display(s) @ 2560x1440 total resolution
[=] Original image(s): k(232).jpg
[=] Processing display: DP-4 (1)
[=] Resolution: 2560x1440
[*] Resizing base image...
/nix/store/yqv00z6djnbwzb4gvrdqirmgvyfw6fga-betterlockscreen-4.2.0/bin/.betterlockscreen-wrapped: eval: line 467: syntax error near unexpected token `('/nix/store/yqv00z6djnbwzb4gvrdqirmgvyfw6fga-betterlockscreen-4.2.0/bin/.betterlockscreen-wrapped: eval: line 467: `convert k(232).jpg -resize 2560x1440^ -gravity center -extent 2560x1440 /home/ivan/.cache/betterlockscreen/1-DP-4/resize.png'[*] Rendering 'blur' effect...convert: unable to open image '/home/ivan/.cache/betterlockscreen/1-DP-4/resize.png': No such file or directory @ error/blob.c/OpenBlob/3571.convert: no images defined `/home/ivan/.cache/betterlockscreen/1-DP-4/blur.png' @ error/convert.c/ConvertImageCommand/3362.[*] Rendering final wallpaper images...[*] Rendering final lockscreen images...[+] Donew="k\(232\).jpg"betterlockscreen -u $w --fx blur[B] Betterlockscreen[*] Updating image cache...[=] Detected 1 display(s) @ 2560x1440 total resolution invalid path: k\(232\).jpg
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Operating system
NixOS 24.05.20240131.b8b232a (Uakari) x86_64
Installation method
Package Manager (from OS)
Betterlockscreen & Dependency-Versions
Bug description
If given file name which contains braces - An "eval" fails in the
betterlockscreen-wrapped
with syntax error upon encountering the brace.If the file name is a string with escaped braces(workaround attempt) - Then other part of
betterlockscreen-wrapped
fail which seems to expect a non-escaped string.Steps to reproduce
betterlockscreen -u k\(232\).jpg --fx blur
or any other file name which contains bracesExpect
.betterlockscreen-wrapped: eval: line 467: syntax error near unexpected token
(`The problem is in this eval:
(Workaround attempt)
w="k\(232\).jpg"
betterlockscreen -u $w --fx blur
Expect
invalid path: k\(232\).jpg
The problem seems to be in this more general earlier code which expects normal non-escaped string.
Relevant log output
The text was updated successfully, but these errors were encountered: