File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15+ use std:: path:: PathBuf ;
1516use std:: {
1617 env,
1718 error:: Error ,
@@ -194,9 +195,9 @@ pub fn download_webrtc() -> Result<(), Box<dyn Error>> {
194195 return Err ( format ! ( "failed to download webrtc: {}" , resp. status( ) ) . into ( ) ) ;
195196 }
196197
197- let tmp_path = env:: var ( "OUT_DIR" ) . unwrap ( ) + "/webrtc.zip" ;
198- let tmp_path = path :: Path :: new ( & tmp_path ) ;
199- let mut file = fs:: File :: options ( ) . write ( true ) . read ( true ) . create ( true ) . open ( tmp_path) ?;
198+ let out_dir = env:: var ( "OUT_DIR" ) . unwrap ( ) ;
199+ let tmp_path = PathBuf :: from ( out_dir ) . join ( "webrtc.zip" ) ;
200+ let mut file = fs:: File :: options ( ) . write ( true ) . read ( true ) . create ( true ) . open ( & tmp_path) ?;
200201 resp. copy_to ( & mut file) ?;
201202
202203 let mut archive = zip:: ZipArchive :: new ( file) ?;
You can’t perform that action at this time.
0 commit comments