mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fix the issue#5275: iso_create doesn't add folders (#5468)
* fix the issue * add changelog * add changelog file * Update changelogs/fragments/5468-iso-create-not-add-folders.yml Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
7a9af2b601
commit
c757e20d10
2 changed files with 5 additions and 3 deletions
2
changelogs/fragments/5468-iso-create-not-add-folders.yml
Normal file
2
changelogs/fragments/5468-iso-create-not-add-folders.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- iso_create - the module somtimes failed to add folders for Joliet and UDF formats (https://github.com/ansible-collections/community.general/issues/5275).
|
|
@ -188,9 +188,9 @@ def add_directory(module, iso_file=None, dir_path=None, rock_ridge=None, use_jol
|
||||||
if rock_ridge:
|
if rock_ridge:
|
||||||
rr_name = os.path.basename(dir_path)
|
rr_name = os.path.basename(dir_path)
|
||||||
if use_joliet:
|
if use_joliet:
|
||||||
joliet_path = iso_dir_path
|
joliet_path = dir_path
|
||||||
if use_udf:
|
if use_udf:
|
||||||
udf_path = iso_dir_path
|
udf_path = dir_path
|
||||||
try:
|
try:
|
||||||
iso_file.add_directory(iso_path=iso_dir_path, rr_name=rr_name, joliet_path=joliet_path, udf_path=udf_path)
|
iso_file.add_directory(iso_path=iso_dir_path, rr_name=rr_name, joliet_path=joliet_path, udf_path=udf_path)
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
|
@ -254,7 +254,7 @@ def main():
|
||||||
udf=use_udf
|
udf=use_udf
|
||||||
)
|
)
|
||||||
if not module.check_mode:
|
if not module.check_mode:
|
||||||
iso_file = pycdlib.PyCdlib()
|
iso_file = pycdlib.PyCdlib(always_consistent=True)
|
||||||
iso_file.new(interchange_level=inter_level, vol_ident=volume_id, rock_ridge=rock_ridge, joliet=use_joliet, udf=use_udf)
|
iso_file.new(interchange_level=inter_level, vol_ident=volume_id, rock_ridge=rock_ridge, joliet=use_joliet, udf=use_udf)
|
||||||
|
|
||||||
for src_file in src_file_list:
|
for src_file in src_file_list:
|
||||||
|
|
Loading…
Reference in a new issue