Commit 9a11bc0
committed
Fix removal of locked libraries on Windows
This commit moves locked files (e.g. DLLs, pyd) to Data/Trash directory,
to defer removal until next restart of ST, while enabling placing
new file at the same location upon library upgrade.
Technically, charset_normalizer failed to upgrade with WinError 5
due to a .pyd file in Lib/ directory being locked by Windows OS.
The strategy is already used by `delete_directory()` function.1 parent c62ba95 commit 9a11bc0
1 file changed
Lines changed: 25 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
| |||
401 | 404 | | |
402 | 405 | | |
403 | 406 | | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
404 | 427 | | |
405 | 428 | | |
406 | 429 | | |
| |||
417 | 440 | | |
418 | 441 | | |
419 | 442 | | |
420 | | - | |
| 443 | + | |
421 | 444 | | |
422 | 445 | | |
423 | 446 | | |
424 | 447 | | |
425 | | - | |
| 448 | + | |
426 | 449 | | |
427 | 450 | | |
428 | 451 | | |
| |||
0 commit comments