Repository navigation
Commit de04285
authored
Windows: flush shell notifications when dismounting with /q (#1852)
* Windows: flush shell notifications when dismounting with /q
* Windows: limit the /q notification flush to the command line dismount
ProcessExitsAfterCommand was set while parsing /q and stayed set when
the process went on as the background task (/q background, and
/q preferences, which is also used at logon). Later interactive
dismounts, automatic dismounts through DismountAll and the hotkeys then
flushed as well, which would also delay the cache wipe that the force
dismount and wipe hotkeys issue after DismountAll.
Set the flag only for the dismount requested on the command line and
clear it right after, whatever Silent is. Rename it to
FlushDriveRemovalNotifications, as /q doesn't necessarily end the
process.
Reword the comments: according to the documentation, SHCNF_FLUSH makes
SHChangeNotify return once the notification has been delivered, which
doesn't mean that Explorer has finished updating its display, and the
cause of the reported ghost drive letters hasn't been established.1 parent 7eab121 commit de04285
3 files changed
Lines changed: 20 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
165 | 169 | | |
166 | 170 | | |
167 | 171 | | |
| |||
9826 | 9830 | | |
9827 | 9831 | | |
9828 | 9832 | | |
9829 | | - | |
9830 | | - | |
9831 | | - | |
9832 | | - | |
9833 | | - | |
9834 | | - | |
9835 | | - | |
| 9833 | + | |
| 9834 | + | |
| 9835 | + | |
| 9836 | + | |
| 9837 | + | |
| 9838 | + | |
| 9839 | + | |
9836 | 9840 | | |
9837 | 9841 | | |
9838 | 9842 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6351 | 6351 | | |
6352 | 6352 | | |
6353 | 6353 | | |
6354 | | - | |
6355 | | - | |
6356 | | - | |
6357 | | - | |
| 6354 | + | |
| 6355 | + | |
| 6356 | + | |
6358 | 6357 | | |
6359 | 6358 | | |
6360 | 6359 | | |
| |||
8446 | 8445 | | |
8447 | 8446 | | |
8448 | 8447 | | |
| 8448 | + | |
| 8449 | + | |
| 8450 | + | |
| 8451 | + | |
8449 | 8452 | | |
8450 | 8453 | | |
8451 | 8454 | | |
| |||
8467 | 8470 | | |
8468 | 8471 | | |
8469 | 8472 | | |
| 8473 | + | |
8470 | 8474 | | |
8471 | 8475 | | |
8472 | 8476 | | |
| |||
0 commit comments