@@ -336,19 +336,19 @@ class PyCdlibCmdLoop(cmd.Cmd):
336
336
print ('The write command supports one and only one parameter.' )
337
337
return False
338
338
339
- out_name = split [0 ]
340
-
341
- self .iso .write (out_name )
339
+ self .iso .write (split [0 ])
342
340
343
341
return False
344
342
345
343
def help_add_file (self ):
346
344
"""The help method for the 'add_file' command."""
347
- print ('> add_file <iso_path> <src_filename> [rr_name=<rr_name>] [joliet_path=<joliet_path>]' )
345
+ print ('> add_file <iso_path> <src_filename> [rr_name=<rr_name>] [joliet_path=<joliet_path>] [udf_path=<udf_path>] ' )
348
346
print ('Add the contents of <src_filename> to the ISO at the location specified in <iso_path>.' )
349
347
print ('If the ISO is a Rock Ridge ISO, <rr_name> must be specified; otherwise, it must not be.' )
350
348
print ('If the ISO is not a Joliet ISO, <joliet_path> must not be specified. If the ISO is a' )
351
- print ('Joliet ISO, <joliet_path> is optional, but highly recommended to supply.' )
349
+ print ('Joliet ISO, <joliet_path> is optional, but highly recommended.' )
350
+ print ('If the ISO is not a UDF ISO, <udf_path> must not be specified. If the ISO is a' )
351
+ print ('UDF ISO, <udf_path> is optional, but highly recommended.' )
352
352
353
353
def do_add_file (self , line ):
354
354
"""
@@ -364,11 +364,12 @@ class PyCdlibCmdLoop(cmd.Cmd):
364
364
src_path = split [1 ]
365
365
rr_name = None
366
366
joliet_path = None
367
+ udf_path = None
367
368
368
369
for arg in split [2 :]:
369
370
keyval = arg .split ('=' )
370
371
if len (keyval ) != 2 :
371
- print ('Invalid key/val pair, must be rr_name=<rr_name> or joliet_path=<joliet_path>' )
372
+ print ('Invalid key/val pair, must be rr_name=<rr_name>, joliet_path=<joliet_path>, or udf_path=<udf_path >' )
372
373
return False
373
374
374
375
key = keyval [0 ]
@@ -378,8 +379,10 @@ class PyCdlibCmdLoop(cmd.Cmd):
378
379
rr_name = val
379
380
elif key == 'joliet_path' :
380
381
joliet_path = val
382
+ elif key == 'udf_path' :
383
+ udf_path = val
381
384
else :
382
- print ('Unknown key, must be rr_name=<rr_name> or joliet_path=<joliet_path>' )
385
+ print ('Unknown key, must be rr_name=<rr_name>, joliet_path=<joliet_path>, or udf_path=<udf_path >' )
383
386
return False
384
387
385
388
if self .iso .has_rock_ridge () and rr_name is None :
@@ -390,7 +393,7 @@ class PyCdlibCmdLoop(cmd.Cmd):
390
393
tmp = self .cwds ['iso9660' ] + '/' + iso_path
391
394
iso_path = pycdlib .utils .normpath (tmp ).decode ('ascii' )
392
395
393
- self .iso .add_file (src_path , iso_path , rr_name = rr_name , joliet_path = joliet_path )
396
+ self .iso .add_file (src_path , iso_path , rr_name = rr_name , joliet_path = joliet_path , udf_path = udf_path )
394
397
395
398
return False
396
399
0 commit comments