Code Duplication    Length = 9-10 lines in 2 locations

class/pcltar.lib.php 2 locations

@@ 1445-1453 (lines=9) @@
1442
            TrFctMessage(__FILE__, __LINE__, 4, 'File position before header =' . ('tar' === $p_mode ? ftell($p_tar) : gztell($p_tar)));
1443
1444
            // ----- Add the file
1445
            if (1 != ($v_result = PclTarHandleAddFile($p_tar, $p_filename, $p_mode, $v_header, $p_add_dir, $p_remove_dir))) {
1446
                // ----- Return status
1447
                TrFctEnd(__FILE__, __LINE__, $v_result);
1448
1449
                return $v_result;
1450
            }
1451
1452
            // ----- Store the file infos
1453
            $p_list_detail[$v_nb++] = $v_header;
1454
1455
            // ----- Look for directory
1456
            if (is_dir($p_filename)) {
@@ 1475-1484 (lines=10) @@
1472
                        TrFctMessage(__FILE__, __LINE__, 4, "Add the file '" . $v_path . $p_hitem . "'");
1473
1474
                        // ----- Add the file
1475
                        if (1 != ($v_result = PclTarHandleAddFile($p_tar, $v_path . $p_hitem, $p_mode, $v_header, $p_add_dir, $p_remove_dir))) {
1476
                            // ----- Return status
1477
                            TrFctEnd(__FILE__, __LINE__, $v_result);
1478
1479
                            return $v_result;
1480
                        }
1481
1482
                        // ----- Store the file infos
1483
                        $p_list_detail[$v_nb++] = $v_header;
1484
                    } // ----- Recursive call to PclTarHandleAddFile()
1485
                    else {
1486
                        TrFctMessage(__FILE__, __LINE__, 4, "'" . $v_path . $p_hitem . "' is a directory");
1487