Changeset 1263
- Timestamp:
- 01/31/10 23:09:12 (7 months ago)
- Files:
-
- 1 modified
-
trunk/CPFPerianPrefPaneController.m (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/CPFPerianPrefPaneController.m
r1262 r1263 456 456 457 457 if(oldExist) 458 cmd = "mv -f \"$DST_COMPONENT\" \"$TMP_PATH\" && " 459 "ditto -x -k --rsrc \"$SRC_ARCHIVE\" \"$DST_PATH\" && " 460 "rm -rf \"$TMP_PATH\""; 458 cmd = "rm -rf \"$DST_COMPONENT\" && " 459 "ditto -x -k --rsrc \"$SRC_ARCHIVE\" \"$DST_PATH\""; 461 460 else 462 461 cmd = "mkdir -p \"$DST_PATH\" && " … … 466 465 setenv("DST_PATH", [destination fileSystemRepresentation], 1); 467 466 setenv("DST_COMPONENT", [finalPath fileSystemRepresentation], 1); 468 setenv("TMP_PATH", [[finalPath stringByAppendingPathExtension:@"old"] fileSystemRepresentation], 1);469 467 470 468 int status = system(cmd); … … 476 474 unsetenv("SRC_ARCHIVE"); 477 475 unsetenv("DST_COMPONENT"); 478 unsetenv("TMP_PATH");479 476 unsetenv("DST_PATH"); 480 477 return ret; … … 490 487 491 488 if(oldExist) 492 cmd = " mv -f \"$DST_COMPONENT\" \"$TMP_PATH\" && "489 cmd = "rm -rf \"$DST_COMPONENT\" && " 493 490 "ditto -x -k --rsrc \"$SRC_ARCHIVE\" \"$DST_PATH\" && " 494 "rm -rf \"$TMP_PATH\" && "495 491 "chown -R root:admin \"$DST_COMPONENT\""; 496 492 else … … 501 497 setenv("SRC_ARCHIVE", [archivePath fileSystemRepresentation], 1); 502 498 setenv("DST_COMPONENT", [finalPath fileSystemRepresentation], 1); 503 setenv("TMP_PATH", [[finalPath stringByAppendingPathExtension:@"old"] fileSystemRepresentation], 1);504 499 setenv("DST_PATH", [destination fileSystemRepresentation], 1); 505 500 … … 519 514 unsetenv("SRC_ARCHIVE"); 520 515 unsetenv("DST_COMPONENT"); 521 unsetenv("TMP_PATH");522 516 unsetenv("DST_PATH"); 523 517 return ret;
