mirror of
https://github.com/Jonny007-MKD/OTR-DecodeAll
synced 2025-01-22 08:49:50 +01:00
Replacing old uncut files with new cuttable otrkeys
This commit is contained in:
parent
22bad54afe
commit
bbfdfce5bf
1 changed files with 19 additions and 0 deletions
19
otrDecodeAll
19
otrDecodeAll
|
@ -440,6 +440,25 @@ function funcProcessFiles {
|
||||||
if (( success == 1 )); then # Cutting did not fail
|
if (( success == 1 )); then # Cutting did not fail
|
||||||
status=3;
|
status=3;
|
||||||
alrMoved=0; # Our new file is in tempDir
|
alrMoved=0; # Our new file is in tempDir
|
||||||
|
else # Cutting did fail
|
||||||
|
local sizeEnc
|
||||||
|
local sizeDec
|
||||||
|
sizeEnc=`stat -L -c%s "$pathAbsEncoded"`
|
||||||
|
sizeDec=`stat -L -c%s "$pathTmpAbsDecoded"`
|
||||||
|
if [ $(($sizeEnc-$sizeDec)) -ne 522 ]; then # If decoded file is different to encoded file
|
||||||
|
funcLog 5 "Cutting failed. But the encoded file ($sizeEnc) is not the source of the decoded file ($sizeDec)."
|
||||||
|
funcLog 5 "Searching cutlists for encoded file"
|
||||||
|
funcLog 5 "$cmdCut -find-cl 522 \"$pathAbsEncoded\""
|
||||||
|
$cmdCut -find-cl 522 "$pathAbsEncoded"
|
||||||
|
if [ $? -eq 0 ]; then # The (new) encoded file can be cut
|
||||||
|
funcLog 3 "The new otrkey file can be cut. We will try it."
|
||||||
|
## What shall we do now?
|
||||||
|
funcRemoveFile "$pathTmpAbsDecoded"
|
||||||
|
# Next time the file will be decoded and cut. This is not the best way...
|
||||||
|
else
|
||||||
|
funcLog 5 "No cutlist found"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue