File tree 4 files changed +13
-0
lines changed
4 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
12
12
- Metadata hook: add suport for additional-classifiers property #10
13
13
14
+ ### Fixed
15
+
16
+ - Build hook: fix issue with extract_items when target_path is in a subfolder #11
17
+
14
18
## [ 0.1.0] - 2024-02-05
15
19
16
20
### Added
Original file line number Diff line number Diff line change @@ -194,6 +194,8 @@ def _process_extract_items_action(
194
194
for index , zip_path in enumerate (zip_paths ):
195
195
item_src = Path (tempdir ) / str (zip_path )
196
196
item_dst = base_target_dir / str (target_paths [index ])
197
+ if item_dst .parent and not item_dst .parent .exists ():
198
+ item_dst .parent .mkdir (parents = True , exist_ok = True )
197
199
shutil .move (src = str (item_src ), dst = item_dst )
198
200
199
201
if "remove" in action_data :
Original file line number Diff line number Diff line change @@ -38,6 +38,12 @@ source="https://tmp.kiwix.org/ci/hatch_openzim_testsets/testset2.zip"
38
38
zip_paths =[" keep1/file1.txt" ]
39
39
target_paths =[" file123.txt" ]
40
40
41
+ [files .part2 .actions .action5 ]
42
+ action =" extract_items"
43
+ source =" https://tmp.kiwix.org/ci/hatch_openzim_testsets/testset2.zip"
44
+ zip_paths =[" keep1/file1.txt" ]
45
+ target_paths =[" action5/subfolder1/file123.txt" ]
46
+
41
47
# part without any actions
42
48
[files .part3 .config ]
43
49
target_dir =" part3"
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ def nominal_files():
20
20
"part1/somewhere/something.txt" ,
21
21
"part1/somewhere_else/something.txt" ,
22
22
"part2/file123.txt" ,
23
+ "part2/action5/subfolder1/file123.txt" ,
23
24
"part2/action2/file1.txt" ,
24
25
"part2/action2/file2.txt" ,
25
26
"part2/action3/file1.json" ,
You can’t perform that action at this time.
0 commit comments