Explorar el Código

Remove restore directory if it exists

Bob Mottram hace 8 años
padre
commit
f04afc2a39
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3
    0
      src/freedombone-utils-backup

+ 3
- 0
src/freedombone-utils-backup Ver fichero

562
     if [ -d $USB_MOUNT/backup/${restore_app_name} ]; then
562
     if [ -d $USB_MOUNT/backup/${restore_app_name} ]; then
563
         echo $"Restoring ${restore_app_name} database"
563
         echo $"Restoring ${restore_app_name} database"
564
         local_database_dir=/root/temp${restore_app_name}data
564
         local_database_dir=/root/temp${restore_app_name}data
565
+        if [ -d ${local_database_dir} ]; then
566
+            rm -rf ${local_database_dir}
567
+        fi
565
         function_check restore_directory_from_usb
568
         function_check restore_directory_from_usb
566
         restore_directory_from_usb "${local_database_dir}" "${restore_app_name}data"
569
         restore_directory_from_usb "${local_database_dir}" "${restore_app_name}data"
567
         if [ ! -f /root/temp${restore_app_name}data/${RESTORE_SUBDIR}/temp${restore_app_name}data/${restore_app_name}.sql ]; then
570
         if [ ! -f /root/temp${restore_app_name}data/${RESTORE_SUBDIR}/temp${restore_app_name}data/${restore_app_name}.sql ]; then