[export_meta] Fixed bug where the path would not be updated once exported
This commit is contained in:
parent
4318ea9622
commit
d146a619b6
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ export_meta() {
|
||||||
mv "${TARGET}/${PRESENT_PATH}" "${TARGET}/${FUTURE_PATH}"
|
mv "${TARGET}/${PRESENT_PATH}" "${TARGET}/${FUTURE_PATH}"
|
||||||
[[ $? -eq 0 ]] || local ERR=true
|
[[ $? -eq 0 ]] || local ERR=true
|
||||||
rmdir -p --ignore-fail-on-non-empty "$(dirname "${TARGET}/${PRESENT_PATH}")" >/dev/null 2>&1
|
rmdir -p --ignore-fail-on-non-empty "$(dirname "${TARGET}/${PRESENT_PATH}")" >/dev/null 2>&1
|
||||||
[[ -f "${FUTURE_PATH}" ]] && gawk -i inplace -v trackid=${trackid} -v value="${FUTURE_PATH}" 'BEGIN{FS="\t";OFS="\t"}{if($3==trackid){$4=value}{print $0}}' ${DB_FILE}
|
[[ -f "${TARGET}/${FUTURE_PATH}" ]] && gawk -i inplace -v trackid=${trackid} -v value="${FUTURE_PATH}" 'BEGIN{FS="\t";OFS="\t"}{if($3==trackid){$4=value}{print $0}}' ${DB_FILE}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
[[ "${ERR}" == "true" ]] && return 1 || return 0
|
[[ "${ERR}" == "true" ]] && return 1 || return 0
|
||||||
|
|
Loading…
Reference in a new issue