@@ -118,6 +118,7 @@ struct Main {
118
118
bool no_progress = {};
119
119
bool append = {};
120
120
bool strip_chunks = 0 ;
121
+ bool with_prefix = {};
121
122
std::size_t chunk_size = 0 ;
122
123
std::int32_t level = 0 ;
123
124
std::int32_t level_high_entropy = 0 ;
@@ -174,6 +175,10 @@ struct Main {
174
175
.implicit_value (true );
175
176
program.add_argument (" --no-progress" ).help (" Do not print progress." ).default_value (false ).implicit_value (true );
176
177
program.add_argument (" --strip-chunks" ).default_value (false ).implicit_value (true );
178
+ program.add_argument (" --with-prefix" )
179
+ .help (" Prefix file paths with manifest name" )
180
+ .default_value (false )
181
+ .implicit_value (true );
177
182
178
183
program.add_argument (" --no-ar" )
179
184
.help (" Regex of disable smart chunkers, can be any of: " + Ar::PROCESSORS_LIST ())
@@ -248,6 +253,7 @@ struct Main {
248
253
cli.no_progress = program.get <bool >(" --no-progress" );
249
254
cli.append = program.get <bool >(" --append" );
250
255
cli.strip_chunks = program.get <bool >(" --strip-chunks" );
256
+ cli.with_prefix = program.get <bool >(" --with-prefix" );
251
257
cli.level = program.get <std::int32_t >(" --level" );
252
258
cli.level_high_entropy = program.get <std::int32_t >(" --level-high-entropy" );
253
259
@@ -278,8 +284,12 @@ struct Main {
278
284
279
285
std::cerr << " Processing input manifests ... " << std::endl;
280
286
for (std::uint32_t index = manifests.size (); auto const & path : manifests) {
287
+ auto const name = path.filename ().replace_extension (" " ).generic_string () + ' /' ;
281
288
std::cerr << " MANIFEST: " << path << std::endl;
282
289
RFile::read_file (path, [&, this ](RFile& ofile) {
290
+ if (this ->cli .with_prefix ) {
291
+ ofile.path .insert (ofile.path .begin (), name.begin (), name.end ());
292
+ }
283
293
if (cli.match (ofile)) {
284
294
auto nfile = add_file (ofile, outbundle, resume_file, index );
285
295
writer (std::move (nfile));
0 commit comments