remote_server: Remove unnecessary Box, prevent time-of-check time-of-use bug (#24730)

The MultiWrite struct is defined in the function scope and is allowed to
have a concrete type, which means we can throw away the extra Box.
PathBuf::exists is known to be prone to invalid usage. It doesn't take
into account permissions errors and just returns false, additionally it
introduces a time-of-check time-of-use bug. While extremely unlikely,
why not fix it anyway.

Release Notes:

- remove unnecessary Box
- prevent time-of-check time-of-use bug
5d634245a2tidely committed on 2/13/2025, 3:55:22 AM· committed by GitHubparent21a1541
1 file changedLine totals unavailable