File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -357,15 +357,17 @@ impl<T: DatasetsManager> ArtifactStore<T> {
357
357
}
358
358
}
359
359
360
- let temp_path =
361
- Utf8TempPath :: from_path ( temp_dir. join ( sha256. to_string ( ) ) ) ;
360
+ let temp_path = temp_dir. join ( sha256. to_string ( ) ) ;
362
361
let file = match OpenOptions :: new ( )
363
362
. write ( true )
364
363
. create_new ( true )
365
364
. open ( & temp_path)
366
365
. await
367
366
{
368
- Ok ( file) => file,
367
+ Ok ( file) => NamedUtf8TempFile :: from_parts (
368
+ file,
369
+ Utf8TempPath :: from_path ( temp_dir) ,
370
+ ) ,
369
371
Err ( err) => {
370
372
if err. kind ( ) == ErrorKind :: AlreadyExists {
371
373
return Err ( Error :: AlreadyInProgress { sha256 } ) ;
@@ -378,7 +380,6 @@ impl<T: DatasetsManager> ArtifactStore<T> {
378
380
}
379
381
}
380
382
} ;
381
- let file = NamedUtf8TempFile :: from_parts ( file, temp_path) ;
382
383
383
384
files. push ( Some ( ( file, mountpoint) ) ) ;
384
385
}
You can’t perform that action at this time.
0 commit comments