This commit is contained in:
Jakobus Schürz 2020-11-19 20:35:49 +01:00
commit 734eb0e195
2 changed files with 7 additions and 6 deletions

View file

@ -143,13 +143,13 @@ run_fix () {
if [ -n "${MIMEDEST+x}" ] ; then
if $forcedate; then
[ -n "$newDateTimeOriginal" ] && exiftool "-DateTimeOriginal=$newDateTimeOriginal" "$file"
exiftool '-createdate<datetimeoriginal' -if '($datetimeoriginal)' "$file"
exiftool '-datetimeoriginal<createdate' -if '(not $datetimeoriginal and $createdate)' "$file"
$setdate && [ -n "$newDateTimeOriginal" ] && exiftool "-DateTimeOriginal=$newDateTimeOriginal" "$file"
$setdate && exiftool '-createdate<datetimeoriginal' -if '($datetimeoriginal)' "$file"
$setdate && exiftool '-datetimeoriginal<createdate' -if '(not $datetimeoriginal and $createdate)' "$file"
else
[ -n "$newDateTimeOriginal" ] && exiftool "-DateTimeOriginal=$newDateTimeOriginal" -if '(not $datetimeoriginal)' "$file"
exiftool '-createdate<datetimeoriginal' -if '(not $createdate and $datetimeoriginal)' "$file"
exiftool '-datetimeoriginal<createdate' -if '(not $datetimeoriginal and $createdate)' "$file"
$setdate && [ -n "$newDateTimeOriginal" ] && exiftool "-DateTimeOriginal=$newDateTimeOriginal" -if '(not $datetimeoriginal)' "$file"
$setdate && exiftool '-createdate<datetimeoriginal' -if '(not $createdate and $datetimeoriginal)' "$file"
$setdate && exiftool '-datetimeoriginal<createdate' -if '(not $datetimeoriginal and $createdate)' "$file"
fi
loginfo "$(exiftool -filename -createdate -datetimeoriginal "$file")"

View file

@ -130,6 +130,7 @@ mencfs () {
[ -z ${PKEY+x} ] && { EXIT; return 3; }
[ -z ${ENCDIR+x} ] && { EXIT; return 4; }
[ -z ${DESTDIR+x} ] && DESTDIR="$(dirname $ENCDIR)/$(basename $ENCDIR| tr '[:lower:]' '[:upper:]'| sed -e 's/^\.//')"
[ -d "$DESTDIR" ] || mkdir -p "$DESTDIR"
$PASS "${PKEY}" 1>/dev/null 2>&1 || { logerror "entry $PKEY does not exist in passwordsotre"; return 5; }
local ENCFS_PASSWORD=$($PASS "${PKEY}" | head -n1)