mirror of
https://github.com/AGWA/git-crypt.git
synced 2025-12-25 12:24:20 -08:00
Add multi-platform remove_file helper
And use it for deleting internal keys
This commit is contained in:
@@ -340,6 +340,13 @@ void touch_file (const std::string& filename)
|
||||
CloseHandle(fh);
|
||||
}
|
||||
|
||||
void remove_file (const std::string& filename)
|
||||
{
|
||||
if (!DeleteFileA(filename.c_str())) {
|
||||
throw System_error("DeleteFileA", filename, GetLastError());
|
||||
}
|
||||
}
|
||||
|
||||
static void init_std_streams_platform ()
|
||||
{
|
||||
_setmode(_fileno(stdin), _O_BINARY);
|
||||
|
||||
Reference in New Issue
Block a user