File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -203,12 +203,15 @@ mod test {
203203 fn moves_projects_dir ( ) {
204204 init ( ) ;
205205
206- let config_location = tempfile:: NamedTempFile :: new ( ) . unwrap ( ) ;
206+ // can't use a tempfile for the config location directly
207+ // because windows won't let us replace a tempfile while it's "open"
208+ let config_dir = tempfile:: tempdir ( ) . unwrap ( ) ;
209+ let config_location = config_dir. path ( ) . join ( "tmc_config.temp" ) ;
207210 let projects_dir = tempfile:: tempdir ( ) . unwrap ( ) ;
208211 let target_dir = tempfile:: tempdir ( ) . unwrap ( ) ;
209212
210213 let tmc_config = TmcConfig {
211- location : config_location. path ( ) . to_path_buf ( ) ,
214+ location : config_location,
212215 projects_dir : projects_dir. path ( ) . to_path_buf ( ) ,
213216 table : Table :: new ( ) ,
214217 } ;
You can’t perform that action at this time.
0 commit comments