Check if path provided by user is relative

This commit is contained in:
2021-10-20 12:22:51 +03:00
parent d140b82678
commit 3ba35bc532

View File

@@ -32,6 +32,10 @@ if [[ "$arg" == "--restore" ]] ; then
set_wallpaper $path
else
if [[ "$arg" == ./* ]] ; then
arg="$PWD/$arg"
fi
echo "$arg" > $HOME/.wallpaper
echo "Saved $arg as a wallpaper but you need to run 'set-wallpaper --restore'"