File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -170,13 +170,6 @@ pub fn unzip(
170
170
let target_path = tmp_path. join ( path. clone ( ) ) ;
171
171
create_parent_path_if_not_exists ( target_path. as_path ( ) ) ?;
172
172
let mut outfile = File :: create ( & target_path) ?;
173
- io:: copy ( & mut file, & mut outfile) ?;
174
- unzipped_files += 1 ;
175
- log. trace ( format ! (
176
- "File extracted to {} ({} bytes)" ,
177
- target_path. display( ) ,
178
- file. size( )
179
- ) ) ;
180
173
181
174
// Set permissions in Unix-like systems
182
175
#[ cfg( unix) ]
@@ -187,6 +180,14 @@ pub fn unzip(
187
180
fs:: set_permissions ( & target_path, fs:: Permissions :: from_mode ( mode) ) ?;
188
181
}
189
182
}
183
+
184
+ io:: copy ( & mut file, & mut outfile) ?;
185
+ unzipped_files += 1 ;
186
+ log. trace ( format ! (
187
+ "File extracted to {} ({} bytes)" ,
188
+ target_path. display( ) ,
189
+ file. size( )
190
+ ) ) ;
190
191
}
191
192
}
192
193
if unzipped_files == 0 {
You can’t perform that action at this time.
0 commit comments