@@ -29,23 +29,22 @@ private FetchWriter(){
2929 *
3030 * @param itemsToFetch the list of {@link FetchItem}s to write into the fetch.txt
3131 * @param outputDir the root of the bag
32- * @param bagitRootDir the path to the root of the bag
3332 * @param charsetName the name of the encoding for the file
3433 *
3534 * @throws IOException if there was a problem writing a file
3635 */
37- public static void writeFetchFile (final List <FetchItem > itemsToFetch , final Path outputDir , final Path bagitRootDir , final Charset charsetName ) throws IOException {
36+ public static void writeFetchFile (final List <FetchItem > itemsToFetch , final Path outputDir , final Charset charsetName ) throws IOException {
3837 logger .debug (messages .getString ("writing_fetch_file_to_path" ), outputDir );
3938 final Path fetchFilePath = outputDir .resolve ("fetch.txt" );
4039
4140 for (final FetchItem item : itemsToFetch ){
42- final String line = formatFetchLine (item , bagitRootDir );
41+ final String line = formatFetchLine (item );
4342 logger .debug (messages .getString ("writing_line_to_file" ), line , fetchFilePath );
4443 Files .write (fetchFilePath , line .getBytes (charsetName ), StandardOpenOption .APPEND , StandardOpenOption .CREATE );
4544 }
4645 }
4746
48- private static String formatFetchLine (final FetchItem fetchItem , final Path bagitRootDir ){
47+ private static String formatFetchLine (final FetchItem fetchItem ){
4948 final StringBuilder sb = new StringBuilder ();
5049 sb .append (fetchItem .getUrl ()).append (' ' );
5150
@@ -56,7 +55,7 @@ private static String formatFetchLine(final FetchItem fetchItem, final Path bagi
5655 sb .append (fetchItem .getLength ()).append (' ' );
5756 }
5857
59- sb .append (RelativePathWriter . formatRelativePathString ( bagitRootDir , fetchItem .getPath () ));
58+ sb .append (fetchItem .getPath ());
6059
6160 return sb .toString ();
6261 }
0 commit comments