check for filetime

This commit is contained in:
Antonio J. Delgado 2024-11-20 12:48:11 +02:00
parent f511f165ed
commit af0721c7a1

View file

@ -9,7 +9,7 @@ do
if [ -n "${last_file}" ]; then
echo "Last modified file is '${last_file}'"
filetime="$(jq '.info_dict.filetime' -- "${last_file}" )"
if [ "${filetime}" != "null" ]; then
if [ "${filetime}" != "null" ] && [ -n "${filetime}" ]; then
last_file_time_formated=$(date -d "@${filetime}" +%Y%m%d%H%M.%S)
touch -t "${last_file_time_formated}" -- "${dir}"
else