Changeset 3613 in MondoRescue for branches/3.2/mondo/src/mondorestore/mondo-rstr-compare.c
- Timestamp:
- Nov 18, 2016, 5:31:42 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/mondorestore/mondo-rstr-compare.c
r3273 r3613 6 6 #include "my-stuff.h" 7 7 #include "mr_mem.h" 8 #include "mr_file.h" 8 9 #include "../common/mondostructures.h" 9 10 #include "../common/libmondo.h" … … 452 453 /** needs malloc *********/ 453 454 char *tmp = NULL; 454 char * cwd, *new;455 char *old_pwd = NULL; 455 456 char *command = NULL; 456 457 int resA = 0; … … 459 460 460 461 malloc_string(tmp); 461 malloc_string(cwd);462 malloc_string(new);463 464 462 assert(bkpinfo != NULL); 465 463 466 if (getcwd(cwd, MAX_STR_LEN - 1)) { 467 // FIXME 468 } 464 old_pwd = mr_getcwd(); 469 465 if (chdir(bkpinfo->restore_path)) { 470 466 //FIXME 471 467 } 472 if (getcwd(new, MAX_STR_LEN - 1)) {473 // FIXME474 }475 468 insist_on_this_cd_number(g_current_media_number); 476 469 unlink(MONDO_CACHE"/changed.txt"); … … 478 471 resA = compare_all_tarballs(); 479 472 resB = compare_all_biggiefiles(); 480 if (chdir( cwd)) {473 if (chdir(old_pwd)) { 481 474 // FIXME 482 475 } 476 mr_free(old_pwd); 477 483 478 noof_changed_files = count_lines_in_file(MONDO_CACHE"/changed.txt"); 484 479 if (noof_changed_files) { … … 494 489 mr_free(tmp); 495 490 } 496 497 paranoid_free(cwd);498 paranoid_free(new);499 500 491 return (resA + resB); 501 492 } … … 525 516 long q; 526 517 char *tmp = NULL; 527 char *new; 528 char *cwd; 529 530 malloc_string(new); 531 malloc_string(cwd); 518 char *old_pwd = NULL; 532 519 533 520 /************************************************************************** … … 612 599 613 600 log_msg(2, "calling popup_changelist_from_file()"); 614 if (getcwd(cwd, MAX_STR_LEN - 1)) { 615 //FIXME 616 } 601 old_pwd = mr_getcwd(); 617 602 if (chdir(bkpinfo->restore_path)) { 618 603 // FIXME 619 604 } 620 if (getcwd(new, MAX_STR_LEN - 1)) {621 //FIXME622 }623 605 popup_changelist_from_file(MONDO_CACHE"/changed.files"); 624 if (chdir( cwd)) {606 if (chdir(old_pwd)) { 625 607 // FIXME 626 608 } 609 mr_free(old_pwd); 627 610 log_msg(2, "Returning from popup_changelist_from_file()"); 628 611 } … … 634 617 635 618 kill_petris(); 636 paranoid_free(new);637 paranoid_free(cwd);638 619 return (retval); 639 620 }
Note:
See TracChangeset
for help on using the changeset viewer.