Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Create file recovery directory if it doesn't already exist #17255
Fixes #17013 by creating the recovery directory
Description of the Change
From v1.24.0 to v1.25.0-beta0 a regression issue was created by replacing fs-plus.copyFileSync() with a local function that does a stream copy. The problem is that the new function does not create the directory first, but fs-plus.copyFileSync() did.
I've added the same mkdirp.sync() call that fs-plus uses in copyFileSync().
It's also possible to revert to using copyFileSync() from fs-plus, but I presume the change was for a good reason.
Why Should This Be In Core?
The FileRecoveryService is core functionality.
Fixes very significant problems that folks have been experiencing with git
None that I can see.
I was not able to reproduce the issue with this change in place.