1
1

Merge branch '3105_move_dir_crash'

* 3105_move_dir_crash:
  Ticket #3105: fix crash when moving directories on different file systems
Этот коммит содержится в:
Andrew Borodin 2013-11-22 14:21:21 +04:00
родитель edf9a499d3 bae94b7acd
Коммит d501e20b9e

Просмотреть файл

@ -930,6 +930,9 @@ file_progress_show_count (FileOpContext * ctx, size_t done, size_t total)
return;
ui = ctx->ui;
if (ui->total_files_processed_label == NULL)
return;
if (ctx->progress_totals_computed)
g_snprintf (buffer, BUF_TINY, _("Files processed: %zu/%zu"), done, total);
else
@ -946,8 +949,6 @@ file_progress_show_total (FileOpTotalContext * tctx, FileOpContext * ctx, uintma
char buffer[BUF_TINY];
char buffer2[BUF_TINY];
char buffer3[BUF_TINY];
char buffer4[BUF_TINY];
struct timeval tv_current;
FileOpContextUI *ui;
if (ctx == NULL || ctx->ui == NULL)
@ -955,7 +956,7 @@ file_progress_show_total (FileOpTotalContext * tctx, FileOpContext * ctx, uintma
ui = ctx->ui;
if (ctx->progress_totals_computed)
if (ui->progress_total_gauge != NULL)
{
if (ctx->progress_bytes == 0)
gauge_show (ui->progress_total_gauge, 0);
@ -970,6 +971,11 @@ file_progress_show_total (FileOpTotalContext * tctx, FileOpContext * ctx, uintma
if (!show_summary && tctx->bps == 0)
return;
if (ui->time_label != NULL)
{
struct timeval tv_current;
char buffer4[BUF_TINY];
gettimeofday (&tv_current, NULL);
file_frmt_time (buffer2, tv_current.tv_sec - tctx->transfer_start.tv_sec);
@ -980,6 +986,7 @@ file_progress_show_total (FileOpTotalContext * tctx, FileOpContext * ctx, uintma
g_snprintf (buffer, BUF_TINY, _("Time: %s %s"), buffer2, buffer3);
else
{
file_bps_prepare_for_show (buffer4, (long) tctx->bps);
g_snprintf (buffer, BUF_TINY, _("Time: %s %s (%s)"), buffer2, buffer3, buffer4);
}
@ -996,7 +1003,10 @@ file_progress_show_total (FileOpTotalContext * tctx, FileOpContext * ctx, uintma
}
label_set_text (ui->time_label, buffer);
}
if (ui->total_bytes_label != NULL)
{
size_trunc_len (buffer2, 5, tctx->copied_bytes, 0, panels_options.kilobyte_si);
if (!ctx->progress_totals_computed)
g_snprintf (buffer, BUF_TINY, _(" Total: %s "), buffer2);
@ -1007,6 +1017,7 @@ file_progress_show_total (FileOpTotalContext * tctx, FileOpContext * ctx, uintma
}
hline_set_text (ui->total_bytes_label, buffer);
}
}
/* }}} */