You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
static mode_t newdir_umask; /* umask when creating new directories */
static mode_t current_umask; /* current umask (which is set to 0 if -p) */
static mode_t newdir_umask; /* umask when creating new directories */
static mode_t current_umask; /* current umask (which is set to 0 if -p) */
/* Option -p clears the kernel umask, so it does not affect proper
restoration of file permissions. New intermediate directories will
comply with umask at start of program. */
/* Option -p clears the kernel umask, so it does not affect proper
restoration of file permissions. New intermediate directories will
comply with umask at start of program. */
if (incremental_option)
/* Read the entry and delete files that aren't listed in the archive. */
purge_directory (file_name);
if (incremental_option)
/* Read the entry and delete files that aren't listed in the archive. */
purge_directory (file_name);
else
{
do
fd = open_output_file (file_name, typeflag);
while (fd < 0 && maybe_recoverable (file_name, &interdir_made));
else
{
do
fd = open_output_file (file_name, typeflag);
while (fd < 0 && maybe_recoverable (file_name, &interdir_made));
if (current_stat_info.is_sparse)
sparse_extract_file (fd, ¤t_stat_info, &size);
else
if (current_stat_info.is_sparse)
sparse_extract_file (fd, ¤t_stat_info, &size);
else
/* Locate data, determine max length writeable, write it,
block that we have used the data, then check if the write
worked. */
/* Locate data, determine max length writeable, write it,
block that we have used the data, then check if the write
worked. */
- write_error_details (file_name, count, written); /* FIXME: shouldn't we
- restore from backup? */
+ if (!to_command_option)
+ write_error_details (file_name, count, written);
+ /* FIXME: shouldn't we restore from backup? */
- set_stat (file_name, ¤t_stat_info.stat, 0, 0,
- (old_files_option == OVERWRITE_OLD_FILES ?
- UNKNOWN_PERMSTATUS : ARCHIVED_PERMSTATUS),
- typeflag);
+ if (to_command_option)
+ sys_wait_command ();
+ else
+ set_stat (file_name, ¤t_stat_info.stat, 0, 0,
+ (old_files_option == OVERWRITE_OLD_FILES ?
+ UNKNOWN_PERMSTATUS : ARCHIVED_PERMSTATUS),
+ typeflag);
static int
extract_link (char *file_name, int typeflag)
{
char const *link_name = safer_name_suffix (current_stat_info.link_name, true);
int interdir_made = 0;
static int
extract_link (char *file_name, int typeflag)
{
char const *link_name = safer_name_suffix (current_stat_info.link_name, true);
int interdir_made = 0;
if (absolute_names_option
|| ! (IS_ABSOLUTE_FILE_NAME (current_stat_info.link_name)
|| contains_dot_dot (current_stat_info.link_name)))
if (absolute_names_option
|| ! (IS_ABSOLUTE_FILE_NAME (current_stat_info.link_name)
|| contains_dot_dot (current_stat_info.link_name)))
if (stat (h->file_name, &st) != 0)
stat_error (h->file_name);
else
if (stat (h->file_name, &st) != 0)
stat_error (h->file_name);
else
do
status = mknod (file_name, current_stat_info.stat.st_mode,
current_stat_info.stat.st_rdev);
while (status && maybe_recoverable (file_name, &interdir_made));
do
status = mknod (file_name, current_stat_info.stat.st_mode,
current_stat_info.stat.st_rdev);
while (status && maybe_recoverable (file_name, &interdir_made));
while ((status = mkfifo (file_name, current_stat_info.stat.st_mode)))
if (!maybe_recoverable (file_name, &interdir_made))
break;
while ((status = mkfifo (file_name, current_stat_info.stat.st_mode)))
if (!maybe_recoverable (file_name, &interdir_made))
break;
- if (!remove_any_file (file_name,
- recursive_unlink_option ? RECURSIVE_REMOVE_OPTION
+ if (!remove_any_file (file_name,
+ recursive_unlink_option ? RECURSIVE_REMOVE_OPTION
- WARN ((0, 0, _("Current %s is newer"), quote (file_name)));
+ WARN ((0, 0, _("Current %s is newer or same age"),
+ quote (file_name)));
set_next_block_after (current_header);
decode_header (current_header, ¤t_stat_info, ¤t_format, 1);
set_next_block_after (current_header);
decode_header (current_header, ¤t_stat_info, ¤t_format, 1);