Changes uncomitted in previous merge
This commit is contained in:
commit
dc23c37c06
26
atom
26
atom
@ -539,15 +539,29 @@ getFiles() {
|
||||
echo 'BEGIN TRANSACTION;' >&3
|
||||
while read time size filename
|
||||
do
|
||||
sourcefileid=$(
|
||||
if ! Select source_files id >/dev/null <<-EOWhere
|
||||
filename = $filename
|
||||
mime_type > 0
|
||||
last_change >= $time
|
||||
EOWhere
|
||||
then
|
||||
mimetype=$(file -b --mime-type "$sourcepath/$filename")
|
||||
mimetypeid=$(
|
||||
InsertIfUnset mime_types <<-EOInsert
|
||||
mime_text $mimetype
|
||||
EOInsert
|
||||
)
|
||||
InsertOrUpdate source_files \
|
||||
last_change ${time%.*} \
|
||||
last_change $time \
|
||||
size $size \
|
||||
last_seen $scantime \
|
||||
mime_type $mimetypeid \
|
||||
>/dev/null \
|
||||
<<-EOWhere
|
||||
filename $filename
|
||||
EOWhere
|
||||
)
|
||||
(( ++new ))
|
||||
fi
|
||||
case $(( ++count % 4 )) in
|
||||
0) echo -ne '\r|' ;;
|
||||
1) echo -ne '\r/' ;;
|
||||
@ -558,7 +572,7 @@ getFiles() {
|
||||
find "$sourcepath" -type f -printf "%T@ %s %P\n"
|
||||
)
|
||||
echo 'COMMIT;' >&3
|
||||
echo -e "\r$count files found."
|
||||
echo -e "\r$count files found, ${new:=0} new or changed."
|
||||
}
|
||||
|
||||
updateMimes() {
|
||||
@ -572,7 +586,7 @@ updateMimes() {
|
||||
Update mime_type_actions action 0 >/dev/null < <(
|
||||
cat <<-EOWhere
|
||||
destination_id = ${destinationid["$destination"]}
|
||||
mime_text LIKE ${mime_type//*/%}
|
||||
mime_text LIKE ${mime_type//\*/%}
|
||||
EOWhere
|
||||
)
|
||||
done
|
||||
@ -586,7 +600,7 @@ updateMimes() {
|
||||
Update mime_type_actions action 2 >/dev/null < <(
|
||||
cat <<-EOWhere
|
||||
destination_id = ${destinationid["$destination"]}
|
||||
mime_text LIKE ${mime_type//*/%}
|
||||
mime_text LIKE ${mime_type//\*/%}
|
||||
EOWhere
|
||||
)
|
||||
done
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user