fix: file cleanup
This commit is contained in:
parent
9b8113fdff
commit
60d259b200
@ -153,13 +153,13 @@ decodeFile() {
|
||||
done
|
||||
)
|
||||
status 0
|
||||
cleanup $tmpfile.wav
|
||||
EOInsert
|
||||
)
|
||||
progressSpin
|
||||
fi
|
||||
if (( sox_needed ))
|
||||
then
|
||||
cleanup="$tempdir/$tmpfile"
|
||||
decodeSox "$tempdir/$tmpfile.wav"
|
||||
if ! soxtaskid=$(
|
||||
Select tasks id <<<"key = $tmpfile"
|
||||
@ -183,7 +183,7 @@ decodeFile() {
|
||||
)
|
||||
requires $decodetaskid
|
||||
status 0
|
||||
cleanup $cleanup
|
||||
cleanup $tmpfile.wav
|
||||
EOInsert
|
||||
)
|
||||
progressSpin
|
||||
|
||||
@ -65,7 +65,6 @@ encodeFile::mp3() {
|
||||
echo "cmd_arg$key $cleanedopts"
|
||||
done
|
||||
)
|
||||
cleanup $tempdir/$tmpfile.wav
|
||||
source_file $fileid
|
||||
status 0
|
||||
rename_pattern ${destinationrenamepath[$destination]}/${destinationrename[$destination]}
|
||||
|
||||
@ -33,7 +33,6 @@ encodeFile::opus() {
|
||||
echo "cmd_arg$key $cleanedopts"
|
||||
done
|
||||
)
|
||||
cleanup $tempdir/$tmpfile.wav
|
||||
source_file $fileid
|
||||
status 0
|
||||
rename_pattern ${destinationrenamepath[$destination]}/${destinationrename[$destination]}
|
||||
|
||||
@ -29,7 +29,6 @@ encodeFile::vorbis() {
|
||||
echo "cmd_arg$key ${oggencopts[key]}"
|
||||
done
|
||||
)
|
||||
cleanup $tempdir/$tmpfile.wav
|
||||
source_file $fileid
|
||||
status 0
|
||||
rename_pattern ${destinationrenamepath[$destination]}/${destinationrename[$destination]}
|
||||
|
||||
@ -44,13 +44,13 @@ cleaner() {
|
||||
" FROM tasks" \
|
||||
" WHERE id=$taskid" \
|
||||
" )," \
|
||||
" fat32compat=(" \
|
||||
" fat32compat=(" \
|
||||
" SELECT fat32compat" \
|
||||
" FROM tasks" \
|
||||
" WHERE id=$taskid" \
|
||||
" )," \
|
||||
" ascii=(" \
|
||||
" SELECT ascii" \
|
||||
" ascii=(" \
|
||||
" SELECT ascii" \
|
||||
" FROM tasks" \
|
||||
" WHERE id=$taskid" \
|
||||
" )" \
|
||||
@ -60,9 +60,12 @@ cleaner() {
|
||||
count=$(Select tasks required_by <<<"id = $taskid")
|
||||
if (( count == 0 ))
|
||||
then
|
||||
rm -f "$cleanup"
|
||||
[[ -n "$cleanup" ]] && rm -f "$tempdir/$cleanup"
|
||||
Delete tasks <<<"id = $taskid"
|
||||
unset finishedtasks[key]
|
||||
else
|
||||
Update tasks status 4 \
|
||||
<<<"id = $taskid"
|
||||
fi
|
||||
Delete tasks <<<"id = $taskid"
|
||||
unset finishedtasks[key]
|
||||
done
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user