Fix realpath usage on not existing path

This commit is contained in:
Tobias Reisinger 2021-03-03 18:22:02 +01:00
parent 4f12f262f6
commit a13bb821a7

View file

@ -11,9 +11,9 @@ edit_directory="$HOME/.cache/edit/"
filehash=$(readlink -fn "$1" | md5sum | awk '{ print $1 }')
filedirectory="$edit_directory/$filehash/"
filedirectory=$(realpath -s "$filedirectory")
mkdir -p $filedirectory
filepath=$(realpath -s "$filedirectory/$(basename $1)")
user=$(id -un)