Commit c71a6b5
The android_world Authors
Update implementation of function for pulling files from devices to create a new temporary directory for saving the file every time the function was called.
This ensures the function is thread safe. The old implementation would create a single temporary directory at the module level. When running Android World from multiple threads, this could result in multiple instances trying to save files with the same name in the same directory, resulting in corrupt data. The new implementation avoids this problem.
PiperOrigin-RevId: 8362254931 parent 0e95d64 commit c71a6b5
1 file changed
+11
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | 60 | | |
67 | 61 | | |
68 | 62 | | |
| |||
391 | 385 | | |
392 | 386 | | |
393 | 387 | | |
| 388 | + | |
394 | 389 | | |
395 | 390 | | |
396 | | - | |
| 391 | + | |
397 | 392 | | |
398 | 393 | | |
399 | 394 | | |
| |||
415 | 410 | | |
416 | 411 | | |
417 | 412 | | |
418 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
419 | 421 | | |
420 | 422 | | |
421 | 423 | | |
| |||
439 | 441 | | |
440 | 442 | | |
441 | 443 | | |
442 | | - | |
443 | | - | |
444 | | - | |
| 444 | + | |
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
| |||
0 commit comments