Code Duplication    Length = 9-10 lines in 2 locations

class/pcltar.lib.php 2 locations

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