File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
migration/util/node-types/src/executor Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ pub struct MovementNode {
36
36
37
37
/// Copies a directory recursively.
38
38
fn copy_dir_recursive ( src : & Path , dst : & Path ) -> std:: io:: Result < ( ) > {
39
+
40
+ // make sure the dst directory exists
41
+ fs:: create_dir_all ( dst) ?;
42
+
39
43
for entry in WalkDir :: new ( src) {
40
44
let entry = entry?;
41
45
let rel_path = entry. path ( ) . strip_prefix ( src) . unwrap ( ) ;
@@ -74,13 +78,13 @@ impl MovementNode {
74
78
75
79
// Copy the entire .movement directory recursively
76
80
let movement_dir = dir. join ( ".movement" ) ;
77
- copy_dir_recursive ( & movement_dir, & debug_dir) ?;
81
+ copy_dir_recursive ( & movement_dir, & debug_dir) . context ( "failed to copy movement dir" ) ?;
78
82
79
83
// Set all permissions in the debug directory recursively
80
84
// Note: this would mess up celestia node permissions, but we don't care about that here.
81
85
// We really only care about maptos db permissions.
82
86
// TODO: tighten the copying accordingly.
83
- set_permissions_recursive ( & debug_dir, Permissions :: from_mode ( 0o755 ) ) ?;
87
+ set_permissions_recursive ( & debug_dir, Permissions :: from_mode ( 0o755 ) ) . context ( "failed to set permissions" ) ?;
84
88
85
89
let movement_args = MovementArgs { movement_path : Some ( debug_dir. display ( ) . to_string ( ) ) } ;
86
90
You can’t perform that action at this time.
0 commit comments