}
/* Copy restore file from cdrom */
- if (unattended && !strcmp(restore_file, "")) {
+ if (unattended && (strlen(restore_file) > 0)) {
fprintf(flog, "unattended: Copy restore file\n");
snprintf(commandstring, STRING_SIZE,
"cp /cdrom/%s /harddisk/var/ipfire/backup", restore_file);
}
/* restore backup */
- if (!strcmp(restore_file, "")) {
+ if (strlen(restore_file) > 0) {
fprintf(flog, "unattended: Restoring Backup\n");
snprintf(commandstring, STRING_SIZE,
"cd /harddisk && /bin/tar -xvz --preserve -f /harddisk/var/ipfire/%s", restore_file);
if (mysystem(commandstring)) {
errorbox("unattended: ERROR restoring backup");
- return 0;
}
}