Skip files that we are unable to copy & write it in the log.

pull/10/head
Raphaël Vinot 2013-10-28 22:48:50 +01:00
parent a6205eff13
commit 0458928515
1 changed files with 4 additions and 3 deletions

View File

@ -14,13 +14,12 @@ LOGFILE="${LOGS}/processing.txt"
# Something went wrong.
error_handler(){
echo "FAILED." >> ${LOGFILE}
echo "Something went wrong during the duplication." >> ${LOGFILE}
echo "Something went wrong during the duplication of the last file." >> ${LOGFILE}
echo "Please open a bug on https://www.github.com/Rafiot/KittenGroomer" >> ${LOGFILE}
exit
}
trap error_handler INT
trap error_handler ERR TERM INT
copy(){
src_file=${1}
@ -214,3 +213,5 @@ main(){
IFS=$SAVEIFS
}
echo "Copy finished successfully." >> ${LOGFILE}